Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Interaction with HTTP2 (mod_http2) #6
When attempting to use mod_proxy_protocol in combination with HTTP2 (mod_http2), that particular configuration fails with:
HTTP2 is probably a pretty big change to what the different Apache layers do in terms of separating a connection from requests and responses and I'm not intimately familiar with how this is implemented therefor I'm opening an issue both here and over at mod_http2 about this incompatibility.
referenced this issue
Dec 1, 2016
Cheers, as far as I can tell on a first glance at the code:
This seems to be an issue of correct input filter ordering. The proxy_protocol input filter must read before the h2 input filter.
And subsequently, for request patching, this will happen on a
At this point it's not clear to me where the issue is; icing's comment about this being an ordering issue sounds reasonable based on the reported behaviour, but a quick glance at mod_http2 indicates that it is registering its input-filter after the mod_proxy_protocol input filter (in fact, mod_proxy_protocol registers before mod_ssl, and mod_http2 after mod_ssl). So I'm not sure where the issue is.
Experienced this as well.
OS and package details:
ProxyProtocol is enabled globally (an exception is made for an internal virtualhost running on a non-default port)
This works as expected for virtual hosts not running HTTP/2:
The client IP and port is correctly logged as the fourth item as defined by the global LogFormat directive:
Enabling HTTP/2 on a TLS-enabled virtual host. Other than enabling HTTP/2, this is identical to production, save the obvious differences in certificate, ServerName directive, etc.
Response headers confirm HTTP/2 is being used:
Access log shows the IP and client port of the load balancer, rather than the initiator. Also reconfirms that HTTP/2 is being used.
This GET request is succesful.
Sending a POST is not:
HAProxy configured similarly to production as above:
HTTPD configured with project defaults, ProxyProtocol enabled on 4433 and HTTP/2 enabled on the default SSL virtual host and the
Thanks, could you try the following patch in your 2.4.x build?
Compiling with the above patch works as expected:
Switching request type from
pushed a commit
Mar 19, 2018
added a commit
Mar 19, 2018
Verified working in our staging environment: