Support HTTP responses that neither specify a Content-Length header
authorreyk <reyk@openbsd.org>
Fri, 8 Aug 2008 18:38:14 +0000 (18:38 +0000)
committerreyk <reyk@openbsd.org>
Fri, 8 Aug 2008 18:38:14 +0000 (18:38 +0000)
commit866e3a772e0f94a15d3b31fdd947012dca229c97
tree49404394d4f6e842fd38a06172c4dda04f90dc0a
parentb6feb6bb2935b819b0d800fb8722c94b2d2258fc
Support HTTP responses that neither specify a Content-Length header
nor chunked encoding.  We don't know the length of the HTTP body in
this case, so it only works for single-pass HTTP responses without
subsequent HTTP response headers in the stream.  You can still enforce
the Content-Length header with an "expect" rule.

For example, this fixes response handling from undeadly.org (thttpd)
if relayd is running as a transparent HTTP proxy.
usr.sbin/relayd/relay.c