diff --git a/qse/lib/http/htrd.c b/qse/lib/http/htrd.c index 2f17ef1f..3e91bf87 100644 --- a/qse/lib/http/htrd.c +++ b/qse/lib/http/htrd.c @@ -397,7 +397,15 @@ static qse_mchar_t* parse_initial_line (qse_htrd_t* htrd, qse_mchar_t* line) /* the url must be followed by a space */ if (!is_space_octet(*p)) goto badre; - param.len = p - param.ptr; /* length of the param part */ + if (param.ptr) + { + param.len = p - param.ptr; /* length of the param part */ + } + else + { + tmp.len = p - tmp.ptr; + param.len = 0; + } *p = QSE_MT('\0'); /* null-terminate the path or param part */ if (param.ptr)