Browse Source

Merge branch 'fix_stream_to_once_get_header' of https://github.com/fdmanana/ibrowse into fdmanana-fix_stream_to_once_get_header

pull/35/head
Chandrashekhar Mullaparthi 14 years ago
parent
commit
11ddee38d3
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      src/ibrowse_http_client.erl

+ 8
- 4
src/ibrowse_http_client.erl View File

@ -287,10 +287,14 @@ handle_sock_data(Data, #state{status = get_header}=State) ->
{error, _Reason} ->
shutting_down(State),
{stop, normal, State};
State_1 ->
active_once(State_1),
State_2 = set_inac_timer(State_1),
{noreply, State_2}
#state{socket = Socket, status = Status, cur_req = CurReq} = State_1 ->
case {Status, CurReq} of
{get_header, #request{caller_controls_socket = true}} ->
do_setopts(Socket, [{active, once}], State_1);
_ ->
active_once(State_1)
end,
{noreply, set_inac_timer(State_1)}
end;
handle_sock_data(Data, #state{status = get_body,

Loading…
Cancel
Save