Browse files

must wait for 'close' packet in the case of no content-length with 'C…

…onnection:Close' header

SVN Revision: 373
  • Loading branch information...
1 parent 397cf5b commit e7c7b43c72a7f3fb361e6afad80180c9202e4fcc @nniclausse nniclausse committed Jul 20, 2004
Showing with 3 additions and 1 deletion.
  1. +1 −0 CHANGES
  2. +2 −1 src/tsunami/ts_http_common.erl
View
1 CHANGES
@@ -1,4 +1,5 @@
1.0.beta6 -> 1.0.beta7: Minor bugfixes (20 Jul 2004)
+ - HTTP: really (?) fix parsing of no content-length with connection:close
- better handling of configure (--prefix is working)
- add different types of output backend (currently, only 'text'
works; 'rrdtool' is started but unfinished)
View
3 src/tsunami/ts_http_common.erl
@@ -164,8 +164,9 @@ parse(Data, State=#state_rcv{session=HTTP}) when HTTP#http.status == none;
{NewState#state_rcv{acc=[],dyndata=DynData}, Opts, Http#http.close}
end;
{ok, Http=#http{content_length=0, close=true}, Tail} ->
+ %% no content length, close=true: the server will close the connection
DynData = concat_cookies(Http#http.cookie, State#state_rcv.dyndata),
- {State#state_rcv{session= Http,
+ {State#state_rcv{session= Http, ack_done = false,
datasize = TotalSize,
dyndata= DynData}, [], true};
{ok, Http=#http{content_length=CLength}, Tail} ->

0 comments on commit e7c7b43

Please sign in to comment.