Bug 22330 - SSL Connections w/Keepalive failure
Summary: SSL Connections w/Keepalive failure
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-17 22:38 PST by J. Nick Koston
Modified: 2008-11-18 10:31 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J. Nick Koston 2008-11-17 22:38:41 PST
There appears to be a race condition that will cause safari/webkit to disconnect when it is trying to reuse a keep alive connection for an repeated xml http request.   

To reproduce: 

req 1) Fetch url using js xml http request to a server that supports keep alive.
    wait 15 seconds
req 2) Fetch url using js xml http request to a server that supports keep alive.

If you are seeing the same thing:
    The connection is left open 
    The second request happens
    An encrypted tls alert is sent from the client
    The server drops the connection on error
    The client then opens a new connection and sends the request the request appears to be successful.

After this happens on win32 subsequent requests that will reuse the keep alive connection appear to randomly fail, on osx they still fail but safari/webkit reconnects and the user does not see the failure.

This *may* be a bug in openssl on the server end , however the behavior does not happen with MSIE 5.5, 6.0, or 7.0, and Firefox on win32 , Firefox on osx, Opera on osx.

This was tested with latest webkit nightly and safari 3.2 on win32
Comment 1 J. Nick Koston 2008-11-18 09:33:13 PST
After some wiresharking:

The TLS alert is a close notify from the client.
Comment 2 J. Nick Koston 2008-11-18 10:23:08 PST
Here is an live working example of the problem.

https://koston.org/bug22330/example.html

In firefox the connection stays open.   In Safari the connection closes for each request, but only after its about to make the next request
Comment 3 Mark Rowe (bdash) 2008-11-18 10:31:47 PST
WebKit itself doesn't do any socket-level communications, so this is almost certainly a bug in the underlying network library that WebKit uses.  On Mac and Windows this would be CFNetwork.  Can you please file a bug report against CFNetwork at <http://bugreport.apple.com/>?