Skip to content

Commit

Permalink
Another fix for the save_response_to_file feature
Browse files Browse the repository at this point in the history
  • Loading branch information
chandrusf committed Feb 27, 2008
1 parent 0cfebc0 commit 21f014f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 4 additions & 1 deletion README
@@ -1,4 +1,4 @@
$Id: README,v 1.13 2008/02/07 12:02:10 chandrusf Exp $
$Id: README,v 1.14 2008/02/27 23:39:22 chandrusf Exp $

ibrowse is a HTTP client. The following are a list of features.
- RFC2616 compliant (AFAIK)
Expand All @@ -22,6 +22,9 @@ Comments to : Chandrashekhar.Mullaparthi@t-mobile.co.uk

CONTRIBUTIONS & CHANGE HISTORY
==============================
20-02-2008 - Ram Krishnan sent another patch for another hidden bug in the
save_response_to_file feature.

07-02-2008 - Ram Krishnan (kriyative _at_ gmail dot com) sent a simple patch to
enable specifying the filename in the save_response_to_file option.
When testing the patch, I realised that my original implementation
Expand Down
5 changes: 2 additions & 3 deletions src/ibrowse_http_client.erl
Expand Up @@ -6,7 +6,7 @@
%%% Created : 11 Oct 2003 by Chandrashekhar Mullaparthi <chandrashekhar.mullaparthi@t-mobile.co.uk>
%%%-------------------------------------------------------------------
-module(ibrowse_http_client).
-vsn('$Id: ibrowse_http_client.erl,v 1.15 2008/02/07 12:02:13 chandrusf Exp $ ').
-vsn('$Id: ibrowse_http_client.erl,v 1.16 2008/02/27 23:39:23 chandrusf Exp $ ').

-behaviour(gen_server).
%%--------------------------------------------------------------------
Expand Down Expand Up @@ -874,7 +874,6 @@ parse_11_response(DataRecvd,
%% This clause to extract the body when Content-Length is specified
parse_11_response(DataRecvd,
#state{content_length=CL, rep_buf_size=RepBufSz,
cur_req = CurReq,
reqs=Reqs}=State) ->
NeedBytes = CL - RepBufSz,
DataLen = length(DataRecvd),
Expand All @@ -883,7 +882,7 @@ parse_11_response(DataRecvd,
{RemBody, Rem} = split_list_at(DataRecvd, NeedBytes),
{_, Reqs_1} = queue:out(Reqs),
State_1 = accumulate_response(RemBody, State),
State_2 = handle_response(CurReq, State_1#state{reqs=Reqs_1}),
State_2 = handle_response(State_1#state.cur_req, State_1#state{reqs=Reqs_1}),
State_3 = reset_state(State_2),
parse_response(Rem, State_3);
false ->
Expand Down
2 changes: 1 addition & 1 deletion vsn.mk
@@ -1,2 +1,2 @@
IBROWSE_VSN = 1.3.0
IBROWSE_VSN = 1.3.1

0 comments on commit 21f014f

Please sign in to comment.