PATCH error (failed)net::ERR_HTTP2_PROTOCOL_ERROR

All,

I have a setup with a Solid server running in a docker container behind a F5 firewall with traffic between F5 and server in plain http via Traefik and outside https with valid certificates. I also have a client running the same way. When I want to access my pod on the solid server via my client, everything works find, but when I want to create new Things, I get a net::ERR_HTTP2_PROTOCOL_ERROR. Which I don’t know where it is coming from. I get this error in Chrome, but not in Firefox. The traffic is forced as Html/2 it seems, I don’t know if that is a problem, I think it shouldn’t be. I find this logging in the Chrome net log:

{
   "params":{
      "fin":true,
      "headers":[
         ":status: 205",
         "access-control-allow-credentials: true",
         "access-control-allow-origin: https://example.com",
         "access-control-expose-headers: Accept-Patch,ETag,Last-Modified,Link,Location,MS-Author-Via,Updates-Via,WAC-Allow",
         "date: Wed, 22 Dec 2021 15:56:09 GMT",
         "updates-via: wss://example.com/",
         "vary: Accept,Authorization,Origin",
         "x-powered-by: Community Solid Server",
         "transfer-encoding: chunked",
         "strict-transport-security: max-age=16070400; includeSubDomains"
      ],
      "stream_id":35
   },
   "phase":0,
   "source":{
      "id":241281,
      "start_time":"635002945",
      "type":9
   },
   "time":"635093130",
   "type":193
},

{
   "params":{
      "description":"Received transfer-encoding header",
      "error_code":"1 (PROTOCOL_ERROR)",
      "stream_id":35
   },
   "phase":0,
   "source":{
      "id":241281,
      "start_time":"635002945",
      "type":9
   },
   "time":"635093130",
   "type":200
},

It is complaining about the transfer-encoding header… In http2 this is not allowed. But nodejs is adding this automatically it seems. I tried removing this, but then I got other errors and the server is really slow then. I would suspect Chrome would have a way of dealing with this. I can’t put my finger on it, but I have the feeling the problem is caused by something else… .
In the browser console:


Locally everything works fine… ofcourse… :slight_smile:

[note : edited to obfuscate URLs at OP’s request - jeffz]

The error happened because we are running HTTP2 -->F5–>HTTP1.1–> solid server. When a PATCH request happens, the response from the solid server is an empty response. Nodejs adds the transfer-encoding header automatically, although the body is empty. This is apparently not a problem for HTTP1, but in HTTP2 this is not allowed. F5 doesn’t check if the body of the response is empty, but passes the headers as is. Firefox handles this, but chrome throws a net::ERR_HTTP2_PROTOCOL_ERROR. To fix this, we needed to remove the response header transfer-encoding as an iRule in the F5 when the body is empty.