Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions modules/http3/h3_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,11 @@ static void* APR_THREAD_FUNC stream_worker(apr_thread_t* thd, void* data)
/* CONNECT has no :path; its target is the authority, as in HTTP/1.1. */
ap_parse_uri(r, h3s->path ? h3s->path : h3s->authority ? h3s->authority : "");
r->the_request = apr_pstrcat(r->pool, r->method, " ", r->unparsed_uri, " ", r->protocol, NULL);
if (s->limit_req_line > 0 && strlen(r->the_request) > (apr_size_t)s->limit_req_line)
{
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO() "request failed: client's request-line exceeds LimitRequestLine (longer than %d)", s->limit_req_line);
r->status = HTTP_REQUEST_URI_TOO_LARGE;
}
if (h3s->authority)
{
apr_table_setn(r->headers_in, "Host", apr_pstrdup(r->pool, h3s->authority));
Expand Down
4 changes: 1 addition & 3 deletions test/modules/http3/test_104_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,4 @@ def test_h3_104_10_request_line(self, env):
url = f"https://{env.h3_domain}:{env.https_port}{path}"
assert env.curl_get(url, options=["--http1.1"]).response["status"] == 414
r = env.h3_client().get(path)
env.httpd_error_log.ignore_recent(lognos=["AH00036", "AH00127"])
known_bug(r.status == 403, "LimitRequestLine does not apply")
assert r.status == 414 or r.reset is not None, f"{r}"
assert r.status == 414, f"{r}"