From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Darren Hoo Newsgroups: gmane.lisp.guile.user Subject: Re: An http session that ends with a TCP Reset sent by the server Date: Sun, 16 Jun 2013 11:17:32 +0800 Message-ID: References: <87zjusd5nr.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371352678 5407 80.91.229.3 (16 Jun 2013 03:17:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Jun 2013 03:17:58 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Jun 16 05:17:58 2013 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uo3TY-0006Od-4y for guile-user@m.gmane.org; Sun, 16 Jun 2013 05:17:56 +0200 Original-Received: from localhost ([::1]:39871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uo3TX-0000RM-Ee for guile-user@m.gmane.org; Sat, 15 Jun 2013 23:17:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uo3TO-0000RE-Pb for guile-user@gnu.org; Sat, 15 Jun 2013 23:17:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uo3TN-0007lk-Ny for guile-user@gnu.org; Sat, 15 Jun 2013 23:17:46 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:49055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uo3TN-0007lW-Hc for guile-user@gnu.org; Sat, 15 Jun 2013 23:17:45 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uo3TL-00069P-CH for guile-user@gnu.org; Sun, 16 Jun 2013 05:17:43 +0200 Original-Received: from li511-224.members.linode.com ([66.175.216.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Jun 2013 05:17:43 +0200 Original-Received: from darren.hoo by li511-224.members.linode.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 16 Jun 2013 05:17:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: li511-224.members.linode.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (darwin) Cancel-Lock: sha1:CnvJxRk1hoJudGGUEYXhVbsv/jE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10440 Archived-At: Mark H Weaver writes: Hi Mark, Thanks, > > While it is true that the RFCs allow a TCP connection to be "aborted" by > a RST segment, this is an error condition. It's not a proper way to end > an HTTP connection under normal circumstances. > > I believe the server you are trying to talk to is violating the HTTP > protocol. Among other things, I believe that a RST segment may cause > the receiving side to discard any input buffers that have not yet been > read by the client. Yes it is violateing the protocol. Sorry to have not mentioned that the response recieved is from the firewall not the real server. > I see nothing in RFC 2616 that allows this behavior. In fact, section > 10.4 explicitly mentions the danger that resetting the connection may > cause data loss. > >> My question is how I can I handle this, ie, read the response body >> and ignore the RST >> in Guile without changing anything in libguile? > > I'm sorry, but I don't see an easy way to work around this problem > (which doesn't necessarily mean it can't be done). > > Out of curiosity, do you know what software is running on this server? > > Have you checked to see whether the server resets the connection when > talking to a different HTTP client? > Yes, both curl and brower receive RST but do not report anything conceivable to the user. I think there's no elegant way to deal with this condition with Guile, maybe I should try other alternative to work around this.