Skip to content

Release v2.0.3

Compare
Choose a tag to compare
@github-actions github-actions released this 22 Oct 22:24
4e40b40
Write CONNECT response in a single call to Conn.Write() (#117)

This introduces a few changes from the previous version:

1. If we build an http.Response and call its Write() function, it will
   write the response line-by-line. This seems to be the cause of some
   flakiness with clients that start tunnel mode after the status line,
   rather than after the response header, as per RFC9110 9.3.6.

2. We only support HTTP 1.0 and 1.1. We no longer just blindly copy over
   the HTTP version from the client request.

3. The status code is still 200 but the status message has changed from
   "OK" to "Connection Established", in line with what other proxies are
   doing (I tested Squid, Martian and Zscaler). Clients ignore this
   anyway, going with the status code, so this shouldn't matter.

4. We no longer send a 'Connection: close' header with the response.
   This is redundant in a CONNECT request, and follows what other
   proxies (Squid, Martian and Zscaler) do.