harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Liang <richard.lian...@gmail.com>
Subject Re: [jira] Commented: (HARMONY-499) Java 5 Enhancement: java.net.HttpURLConnection should send request head with a connection-field of "Keep-Alive"
Date Thu, 15 Jun 2006 06:44:04 GMT
Hello Alexander,

I agree that my implementation about "Connection: Keep-Alive" is 
incorrect. Thank you.

And as mentioned in the spec of "Persistent Connections"[1]:


/The support for HTTP keep-Alive is done transparently. However, it can 
be controlled by system properties http.keepAlive, and 
http.maxConnections, as well as by HTTP/1.1 specified request and 
response headers.

The system properties that control the behavior of Keep-Alive are:

default: true
Indicates if keep alive (persistent) connections should be supported.

default: 5
Indicates the maximum number of connections per destination to be kept 
alive at any given time/

So we SHALL provide some kind of cache mechanism to support Persistent 
Connections, would you mind raise a separate JIRA about this issue? 
Thanks a lot.


Alexander Kleymenov (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/HARMONY-499?page=comments#action_12414202
> Alexander Kleymenov commented on HARMONY-499:
> ---------------------------------------------
> Hello,
> I am working on HttpsURLConnection and noticed this JIRA report.
> I went through the Java 5 Enhancements for Networking and could not found any statements
for HttpURLConnection. 
> Then I examined the HTTP protocol specification 
> (RFC 2616 can be found at http://www.ietf.org/rfc/rfc2616.txt).
> It says:
>    "HTTP/1.1 applications that do not support persistent connections MUST
>    include the "close" connection option in every message."
> The source file of HttpURLConnection implementation does not seem to support persistent
> So recent changes made to the class
> org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection
> ("Connection: close" --> "Connection: Keep-Alive") seem to be incorrect without implementation
of support for persistent connections.
> Thanks,
> Alexander
>> Java 5 Enhancement: java.net.HttpURLConnection should send request head with a connection-field
of "Keep-Alive"
>> ---------------------------------------------------------------------------------------------------------------
>>          Key: HARMONY-499
>>          URL: http://issues.apache.org/jira/browse/HARMONY-499
>>      Project: Harmony
>>         Type: Improvement
>>   Components: Classlib
>>     Reporter: Richard Liang
>>     Assignee: Tim Ellison
>>     Priority: Minor
>>  Attachments: luni.src.net.diff
>> Hello,
>> java.net.HttpURLConnection should send request head with a default connection-field
of "Keep-Alive". Currently in its implementation, it sends a connection-field of "close",
but does not close its own socket after connection, which may cause low performance and strange
behavior on some servers.
>> Best regards,
>> Richard

Richard Liang
China Software Development Lab, IBM 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message