Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 752DB7CDA for ; Tue, 18 Oct 2011 11:18:32 +0000 (UTC) Received: (qmail 68973 invoked by uid 500); 18 Oct 2011 11:18:31 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 68929 invoked by uid 500); 18 Oct 2011 11:18:31 -0000 Mailing-List: contact dev-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 dev@couchdb.apache.org Received: (qmail 68921 invoked by uid 99); 18 Oct 2011 11:18:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2011 11:18:31 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Oct 2011 11:18:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A843230FCC8 for ; Tue, 18 Oct 2011 11:18:10 +0000 (UTC) Date: Tue, 18 Oct 2011 11:18:10 +0000 (UTC) From: "Jan Lehnardt (Commented) (JIRA)" To: dev@couchdb.apache.org Message-ID: <173050994.5638.1318936690690.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1270081515.2913.1318892590775.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (COUCHDB-1310) '/_restart' closes request socket before sending a response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129669#comment-13129669 ] Jan Lehnardt commented on COUCHDB-1310: --------------------------------------- I don't think the test suite is supposed to support a proxy setup. We added "verify installation" to Futon to cover the basics without running the full test suite for situations like yours. > '/_restart' closes request socket before sending a response > ----------------------------------------------------------- > > Key: COUCHDB-1310 > URL: https://issues.apache.org/jira/browse/COUCHDB-1310 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 1.1 > Environment: All platforms. Tested on Ubuntu 10.10. > Reporter: J. Lee Coltrane > Priority: Minor > Fix For: 1.1 > > Attachments: 0001-fixed-_restart-closes-socket-before-sending-request.patch > > Original Estimate: 0h > Remaining Estimate: 0h > > In 'couchdb_misc_handlers.erl', `handle_restart_req(...)` calls `couch_server_sup:restart_core_server()` before sending the HTTP response. This causes the current request's socket to be closed without sending any response back to the client. From the perspective of the HTTP client, the connection is simply dropped - no response is ever received. > In addition to the obvious aesthetic problems here, the HTTP1.1 spec suggests a specific (and non-desirable) client-side behavior for connections that drop like this. From RFC-2616 Section-8.2.4: "...if the client sees the connection close before receiving any status from the server, the client SHOULD retry the request..." (http://tools.ietf.org/html/rfc2616#section-8.2.4). Any HTTP client that actually obeys this direction, would end up restarting the server multiple times. > I have a patch that fixes this issue. I will attach it to this report. > This issue may be related to COUCHDB-946 (https://issues.apache.org/jira/browse/COUCHDB-946). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira