Google Groups Home
Help | Sign in
#804: http1.0 connections are persistent by default (like 1.1 connections)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
CherryPy  
View profile
 More options Apr 16, 8:25 pm
From: CherryPy <t...@cherrypy.org>
Date: Thu, 17 Apr 2008 00:25:30 -0000
Local: Wed, Apr 16 2008 8:25 pm
Subject: [CherryPy] #804: http1.0 connections are persistent by default (like 1.1 connections)

#804: http1.0 connections are persistent by default (like 1.1 connections)
---------------------------+----------------------------------------------- -
 Reporter:  guest          |       Owner:  fumanchu
     Type:  defect         |      Status:  new    
 Priority:  normal         |   Milestone:          
Component:  CherryPy code  |    Keywords:          
---------------------------+----------------------------------------------- -
 1.0 connections should be persistent only if keep-alive is specified.

 here's the relevant part and fix:

 {{{
 Index: __init__.py
 ===================================================================
 --- __init__.py (revision 1942)
 +++ __init__.py (working copy)
 @@ -405,7 +405,7 @@
              environ["REMOTE_USER"] = user

          # Persistent connection support
 -        if self.response_protocol == "HTTP/1.1":
 +        if req_protocol == "HTTP/1.1":
              if environ.get("HTTP_CONNECTION", "") == "close":
                  self.close_connection = True
          else:
 }}}

--
Ticket URL: <http://www.cherrypy.org/ticket/804>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CherryPy  
View profile
 More options Apr 27, 9:10 pm
From: CherryPy <t...@cherrypy.org>
Date: Mon, 28 Apr 2008 01:10:35 -0000
Local: Sun, Apr 27 2008 9:10 pm
Subject: Re: [CherryPy] #804: http1.0 connections are persistent by default (like 1.1 connections)

#804: http1.0 connections are persistent by default (like 1.1 connections)
---------------------------+----------------------------------------------- -
 Reporter:  guest          |        Owner:  fumanchu  
     Type:  defect         |       Status:  closed    
 Priority:  normal         |    Milestone:            
Component:  CherryPy code  |   Resolution:  worksforme
 Keywords:                 |  
---------------------------+----------------------------------------------- -
Changes (by fumanchu):

  * resolution:  => worksforme
  * status:  new => closed

Comment:

 Hmmmmm... I don't think that code does what you think it does. The
 attribute {{{self.response_protocol}}} is set (just above there) to the
 ''smaller'' of the HTTP versions for the request message and what the
 server supports. So if:

  1) an HTTP/1.0 message arrives, response_protocol will be "HTTP/1.0"
 regardless of server version,
  2) the server is set to only support HTTP/1.0, response_protocol will be
 "HTTP/1.0" regardless of the version of the message

 I think you're describing scenario 2, but it doesn't matter because it
 looks like the right thing happens in all cases.

--
Ticket URL: <http://www.cherrypy.org/ticket/804>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google