From bb2dee1210e9613c40896a684f0430cbd56353c4 Mon Sep 17 00:00:00 2001 From: "bob.ippolito" Date: Mon, 26 May 2008 06:32:11 +0000 Subject: [PATCH] http://code.google.com/p/mochiweb/issues/detail?id=12 git-svn-id: http://mochiweb.googlecode.com/svn/trunk@75 583d1f64-3c3e-0410-8459-0f15fcd77d59 --- src/mochiweb_request.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mochiweb_request.erl b/src/mochiweb_request.erl index 7311dc0..ec41338 100644 --- a/src/mochiweb_request.erl +++ b/src/mochiweb_request.erl @@ -325,7 +325,8 @@ should_close() -> andalso get_header_value("connection") =/= "Keep-Alive") %% unread data left on the socket, can't safely continue orelse (DidNotRecv - andalso get_header_value("content-length") =/= undefined). + andalso get_header_value("content-length") =/= undefined + andalso list_to_integer(get_header_value("content-length")) > 0). %% @spec cleanup() -> ok %% @doc Clean up any junk in the process dictionary, required before continuing