]> Sergey Matveev's repositories - public-inbox.git/commit
http: avoid corking on "Content-Length: 0" response
authorEric Wong <e@80x24.org>
Fri, 29 Apr 2016 04:00:24 +0000 (04:00 +0000)
committerEric Wong <e@80x24.org>
Fri, 29 Apr 2016 07:04:39 +0000 (07:04 +0000)
commite901b85c67912a3fd8d17ac0460a57029439f71d
treeb37babe121047040f41a8542ef3d90edec87a782
parentd456eb0201550050f8ffa0aa279684976cb942a6
http: avoid corking on "Content-Length: 0" response

We must use a normal write instead of send(.., MSG_MORE)
when writing responses of "Content-Length: 0" to avoid
the corking effect MSG_MORE provides.  We only want to
cork headers if we will send a non-empty body.

Fixes: c3eeaf664cf0 ("http: clarify intent for persistence")
This needs a proper test.
lib/PublicInbox/HTTP.pm
t/httpd-corner.psgi
t/httpd-corner.t