diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-04-10 20:05:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-04-10 20:05:40 +0000 |
commit | 9e9af3728c9cc78c935633daa877a21010841fae (patch) | |
tree | dbaeda91a634d01358974d4eba448625d42f2dd0 /ChangeLog | |
parent | 84f0be5c249010235f4e2267cb8f77f6fc07d45a (diff) | |
download | libmicrohttpd-9e9af3728c9cc78c935633daa877a21010841fae.tar.gz libmicrohttpd-9e9af3728c9cc78c935633daa877a21010841fae.zip |
The issue reported below is correct, the fix is not. The "!=" comparing the RF flag should simply have been "==".
Louis wrote:
There is a change of behavior between 0.9.37 and 0.9.38.
When a client adds a "Connection: close" header in 0.9.37, MHD adds a "Connection: close" header to its response and then
close the connection (as suggested in rfc2616, section 8.1.2.1).
The "Connection: close" header is not added in 0.9.38.
I looked into the 0.9.38 code and the code that prevents the inclusion of the "Connection: close" header is at line 773 of connection.c.
if ( ( (NULL != client_requested_close) ||
(MHD_YES == connection->read_closed) ) &&
(NULL == response_has_close) &&
(0 != (connection->response->flags & MHD_RF_HTTP_VERSION_1_0_ONLY) ) )
must_add_close = MHD_YES;
Shouldn't it read
if ( ( (NULL != client_requested_close) ||
(MHD_YES == connection->read_closed) ||
(0 != (connection->response->flags & MHD_RF_HTTP_VERSION_1_0_ONLY) ) ) &&
(NULL == response_has_close) )
must_add_close = MHD_YES;
Thanks,
Louis Benoit
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,3 +1,7 @@ | |||
1 | Fri Apr 10 22:02:27 CEST 2015 | ||
2 | Fix logic to add "Connection: Close" that was broken in 0.9.38 | ||
3 | when adding MHD_RF_HTTP_VERSION_1_0_ONLY. -CG | ||
4 | |||
1 | Fri Apr 10 00:38:40 CEST 2015 | 5 | Fri Apr 10 00:38:40 CEST 2015 |
2 | Ensure fast termination in MHD_USE_THREAD_PER_CONNECTION | 6 | Ensure fast termination in MHD_USE_THREAD_PER_CONNECTION |
3 | mode on W32 by using signal pipe. -CG | 7 | mode on W32 by using signal pipe. -CG |