Unable to Unset Upgrade Header in Apache 2.4

Viewed 352

I have an issue where my Apache server is returning an Upgrade H2 header response sporadically. This causes the following issue with Safari and HTTP2:

  • http2 error: Invalid HTTP header field was received: frame type: 1, stream: 1, name: [upgrade], value: [h2]
  • HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

I have seen similar issues on stackoverflow but none of the proposed solutions have worked for me. I have tried setting "Header unset Upgrade" in the httpd.conf file as well as the ssl.conf and virtualhost specific configuration files. I also tried to unset the header in a location directive in those files.

I have removed the h2c protocol from the mod_http2.c configuration in httpd.conf based on other people having this problem but it did not work by itself or in conjunction with the other changes above.

Protocols h2 http/1.1

I have no idea why the Header unset Upgrade statement is not working. We are using Apache as a reverse proxy with a tomcat application backend. We also have an AWS ALB in front of Apache. Does anyone know why this would not be working or another way to remove the response header "Upgrade"?

0 Answers
Related