couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1056400 - /couchdb/branches/1.1.x/src/ibrowse/ibrowse_http_client.erl
Date Fri, 07 Jan 2011 17:17:46 GMT
Author: fdmanana
Date: Fri Jan  7 17:17:46 2011
New Revision: 1056400

URL: http://svn.apache.org/viewvc?rev=1056400&view=rev
Log:
Merged revision 1056395 from trunk

Applied 2 more ibrowse fixes already submitted upstream

https://github.com/cmullaparthi/ibrowse/pull/24
https://github.com/cmullaparthi/ibrowse/pull/25


Modified:
    couchdb/branches/1.1.x/src/ibrowse/ibrowse_http_client.erl

Modified: couchdb/branches/1.1.x/src/ibrowse/ibrowse_http_client.erl
URL: http://svn.apache.org/viewvc/couchdb/branches/1.1.x/src/ibrowse/ibrowse_http_client.erl?rev=1056400&r1=1056399&r2=1056400&view=diff
==============================================================================
--- couchdb/branches/1.1.x/src/ibrowse/ibrowse_http_client.erl (original)
+++ couchdb/branches/1.1.x/src/ibrowse/ibrowse_http_client.erl Fri Jan  7 17:17:46 2011
@@ -287,10 +287,14 @@ handle_sock_data(Data, #state{status = g
         {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,
@@ -683,6 +687,7 @@ send_req_1(From,
            Headers, Method, Body, Options, Timeout,
            #state{status    = Status,
                   socket    = Socket} = State) ->
+    cancel_timer(State#state.inactivity_timer_ref, {eat_message, timeout}),
     ReqId = make_req_id(),
     Resp_format = get_value(response_format, Options, list),
     Caller_socket_options = get_value(socket_options, Options, []),



Mime
View raw message