From 4e25f5340a167900059af67c629ad9e4fc68d532 Mon Sep 17 00:00:00 2001 From: chandrusf Date: Tue, 9 Oct 2007 00:02:30 +0000 Subject: [PATCH] Bug fix for the case when the webserver returns only a Status line and no headers. Thanks to Peter Kristensen --- README | 6 +++++- src/ibrowse_http_client.erl | 4 ++-- vsn.mk | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README b/README index f12b998..fb9ce4b 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -$Id: README,v 1.10 2007/06/28 22:29:00 chandrusf Exp $ +$Id: README,v 1.11 2007/10/09 00:02:30 chandrusf Exp $ ibrowse is a HTTP client. The following are a list of features. - RFC2616 compliant (AFAIK) @@ -22,6 +22,10 @@ Comments to : Chandrashekhar.Mullaparthi@t-mobile.co.uk CONTRIBUTIONS & CHANGE HISTORY ============================== +29-08-2007 - Bug report by Peter Kristensen(ptx _at_ daimi dot au dot dk). + ibrowse crashes when the webserver returns just the Status line + and nothing else. + 28-06-2007 - Added host_header option to enable connection to secure sites via stunnel diff --git a/src/ibrowse_http_client.erl b/src/ibrowse_http_client.erl index a49e8c4..45246bd 100644 --- a/src/ibrowse_http_client.erl +++ b/src/ibrowse_http_client.erl @@ -6,7 +6,7 @@ %%% Created : 11 Oct 2003 by Chandrashekhar Mullaparthi %%%------------------------------------------------------------------- -module(ibrowse_http_client). --vsn('$Id: ibrowse_http_client.erl,v 1.12 2007/06/28 22:29:01 chandrusf Exp $ '). +-vsn('$Id: ibrowse_http_client.erl,v 1.13 2007/10/09 00:02:30 chandrusf Exp $ '). -behaviour(gen_server). %%-------------------------------------------------------------------- @@ -984,7 +984,7 @@ parse_header([H | T], Acc) -> parse_header([], _) -> invalid. -scan_header([$\n|T], [$\r,$\n,$\r|L]) -> {yes, lists:reverse(L), T}; +scan_header([$\n|T], [$\r,$\n,$\r|L]) -> {yes, lists:reverse([$\n,$\r| L]), T}; scan_header([H|T], L) -> scan_header(T, [H|L]); scan_header([], L) -> {no, L}. diff --git a/vsn.mk b/vsn.mk index 7a6f0f9..1fd844a 100644 --- a/vsn.mk +++ b/vsn.mk @@ -1,2 +1,2 @@ -IBROWSE_VSN = 1.2.7 +IBROWSE_VSN = 1.2.8