Roundup Tracker - Issues

Issue 844577

classification
Use HTTP 'Content-Length' header
Type: Severity: normal
Components: User Interface Versions:
process
Status: closed fixed
:
: richard : richard, tepperly
Priority: normal : patch

Created on 2003-11-18 18:03 by tepperly, last changed 2003-12-05 03:27 by richard.

Files
File name Uploaded Description Edit Remove
roundup063_client_py.txt tepperly, 2003-11-18 18:03 Patch for roundup-0.6.3/roundup/cgi/client.py
Messages
msg2668 Author: [hidden] (tepperly) Date: 2003-11-18 18:03
Attached is a three line diff for
round-0.6.3/roundup/cgi/client.py. Since the content
length is easily available, we should send it. I can't
find it now, but I remember reading somewhere when I
was doing a Java servlet that setting Content-Length
allowed browsers to do things faster.

References:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
msg2669 Author: [hidden] (tepperly) Date: 2003-11-18 18:29
Logged In: YES 
user_id=94539

For Java, setting Content-Length allows the server to use a
persistent connection. I don't know if anything similar
applies to the Python server.

http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpServlet.html#doGet(javax.servlet.http.HttpServletRequest,%20javax.servlet.http.HttpServletResponse)
msg2670 Author: [hidden] (tepperly) Date: 2003-11-18 19:46
Logged In: YES 
user_id=94539

I tried to do some testing. I didn't really see any
significant difference between setting the Content-Length
and not setting the Content-Length.
msg2671 Author: [hidden] (richard) Date: 2003-12-05 03:27
Logged In: YES 
user_id=6405

Hurm. This patch assumes a single write() call with the entire response,  
which isn't always the case. I've added the content-length header to the  
file serving, as we do know the length beforehand there.  
History
Date User Action Args
2003-11-18 18:03:31tepperlycreate