Hello all,

I have recently enabled HTTP/2 on our HAProxy server by adding the following to the bind line:


alpn h2,http/1.1


Everything appears to be working fine, apart from our custom error pages.


Rather than serving the custom page as before, browsers just report an error. In Chrome its ERR_HTTP2_SERVER_REFUSED_STREAM. In Firefox its a more generic response about the data being invalid.


Here is the content of /etc/haproxy/errorpages/503.http:


HTTP/1.0 503 Service Unavailable
Cache-Control: no-cache
Connection: close
Content-Type: text/html

<!DOCTYPE html>
<html>
    <head>
        <title>503 Service Unavailable</title>
    </head>
    <body>
<h1>Service unavailable</h1>
</body>
</html>


I've searched the archives but not found anyone else with this issue - apart from someone who didn't have the correct HTTP headers defined at the top of their error file - but mine look OK. I've tried using HTTP/1.1 instead of HTTP/1.0 and also removing the Connection: close header, but nothing makes a difference.


Any clues as to what I'm doing wrong would be much appreciated.


Thanks,


Nick




Reply via email to