Browse Source

Another fix for the save_response_to_file feature

pull/16/head
chandrusf 17 years ago
parent
commit
21f014f417
3 changed files with 7 additions and 5 deletions
  1. +4
    -1
      README
  2. +2
    -3
      src/ibrowse_http_client.erl
  3. +1
    -1
      vsn.mk

+ 4
- 1
README View File

@ -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)
@ -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

+ 2
- 3
src/ibrowse_http_client.erl View File

@ -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).
%%--------------------------------------------------------------------
@ -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),
@ -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 ->

+ 1
- 1
vsn.mk View File

@ -1,2 +1,2 @@
IBROWSE_VSN = 1.3.0
IBROWSE_VSN = 1.3.1

Loading…
Cancel
Save