Browse Source

[core] 101 upgrade fails if Content-Length incl (fixes #3063)

(thx daimh)

commit 903024d7 in lighttpd 1.4.57 fixed issue #3046 but in the process
broke HTTP/1.1 101 Switching Protocols which included Content-Length: 0
in the response headers.  Content-Length response header is permitted
by the RFCs, but not necessary with HTTP status 101 Switching Protocols.

x-ref:
  "websocket proxy fails if 101 Switching Protocols from backend includes Content-Length"
  https://redmine.lighttpd.net/issues/3063
master
Glenn Strauss 2 months ago
parent
commit
1ca25d4e2c
  1. 1
      src/http-header-glue.c

1
src/http-header-glue.c

@ -961,6 +961,7 @@ void http_response_upgrade_read_body_unknown(request_st * const r) {
(FDEVENT_STREAM_RESPONSE_BUFMIN | FDEVENT_STREAM_RESPONSE);
r->conf.stream_request_body |= FDEVENT_STREAM_REQUEST_POLLIN;
r->reqbody_length = -2;
r->resp_body_scratchpad = -1;
r->keep_alive = 0;
}

Loading…
Cancel
Save