]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Process early errors via a dummy HTTP/1.1 request as well
authorRuediger Pluem <rpluem@apache.org>
Thu, 10 Sep 2020 10:45:12 +0000 (10:45 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 10 Sep 2020 10:45:12 +0000 (10:45 +0000)
commita4fba223668c554e06bc78d6e3a88f33d4238ae4
tree561a917a9f18df1ba5263a037569171b3cb17f05
parentf077e9a2b25b7f664ada36dd34b280f5e07fbcf1
Process early errors via a dummy HTTP/1.1 request as well

Process early errors via a dummy HTTP/1.1 request as well to ensure
that the request gets logged correctly and possible custom error
pages are considered. The previous way of directly sending a HTTP/2
answer with the HTTP status code appropriate for the error is more
efficient, but does not log the request nor sents a possible custom
error page.

* modules/http2/h2.h: Add http_status to h2_request struct and define
  H2_HTTP_STATUS_UNSET.

* modules/http2/h2_request.c(h2_request_create_rec): Check if
  http_status is set for the request and die with the
  status code it contains if set.

* modules/http2/h2_session.c(on_header_cb): Adjust the error condition
  now that we mark early errors via http_status: Only return an error
  if the status is not success and http_status is not H2_HTTP_STATUS_UNSET.

* modules/http2/h2_stream.c(set_error_response): Set http_status
  on the request instead of creating headers for a response and a
  respective brigade.

Github: closes #137

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1881620 13f79535-47bb-0310-9956-ffa450edef68
modules/http2/h2.h
modules/http2/h2_request.c
modules/http2/h2_session.c
modules/http2/h2_stream.c