r17683 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17682‎ | r17683 | r17684 >
Date:21:41, 14 November 2006
Author:river
Status:old
Tags:
Comment:
chunking_filter was missing trailing \r\n
wasn't setting t-e:chunked on chunked error replies
Modified paths:
  • /trunk/willow/src/willow/chunking.cc (modified) (history)
  • /trunk/willow/src/willow/whttp.cc (modified) (history)

Diff [purge]

Index: trunk/willow/src/willow/chunking.cc
@@ -40,7 +40,7 @@
4141 chunking_filter::bf_eof(void)
4242 {
4343 WDEBUG((WLOG_DEBUG, "chunking_filter: EOF"));
44 - _buf.add("\r\n0\r\n", 5, false);
 44+ _buf.add("\r\n0\r\n\r\n", 7, false);
4545 return io::sink_result_finished;
4646 }
4747
Index: trunk/willow/src/willow/whttp.cc
@@ -955,6 +955,8 @@
956956 */
957957 if (_header_parser->_http_vers != http11)
958958 _error_headers->add("Connection", "close");
 959+ else
 960+ _error_headers->add("Transfer-Encoding", "chunked");
959961
960962 _error_headers->sp_connect(_client_sink);
961963 _error_headers->sp_uncork();