Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 97619 invoked from network); 7 Jan 2011 17:15:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jan 2011 17:15:52 -0000 Received: (qmail 58480 invoked by uid 500); 7 Jan 2011 17:15:52 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 58270 invoked by uid 500); 7 Jan 2011 17:15:49 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 58255 invoked by uid 99); 7 Jan 2011 17:15:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jan 2011 17:15:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jan 2011 17:15:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 914B123889E2; Fri, 7 Jan 2011 17:15:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1056395 - /couchdb/trunk/src/ibrowse/ibrowse_http_client.erl Date: Fri, 07 Jan 2011 17:15:24 -0000 To: commits@couchdb.apache.org From: fdmanana@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110107171524.914B123889E2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fdmanana Date: Fri Jan 7 17:15:24 2011 New Revision: 1056395 URL: http://svn.apache.org/viewvc?rev=1056395&view=rev Log: Applied 2 more ibrowse fixes already submitted upstream https://github.com/cmullaparthi/ibrowse/pull/24 https://github.com/cmullaparthi/ibrowse/pull/25 Modified: couchdb/trunk/src/ibrowse/ibrowse_http_client.erl Modified: couchdb/trunk/src/ibrowse/ibrowse_http_client.erl URL: http://svn.apache.org/viewvc/couchdb/trunk/src/ibrowse/ibrowse_http_client.erl?rev=1056395&r1=1056394&r2=1056395&view=diff ============================================================================== --- couchdb/trunk/src/ibrowse/ibrowse_http_client.erl (original) +++ couchdb/trunk/src/ibrowse/ibrowse_http_client.erl Fri Jan 7 17:15:24 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, []),