http server use both settimeout and makefile

Bug #158972 reported by Vincent Ladeuil
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Undecided
Vincent Ladeuil

Bug Description

http://docs.python.org/lib/socket-objects.html says:

...
A consequence of this is that file objects returned by the makefile() method must only be used when the socket is in blocking mode; in timeout or non-blocking mode file operations that cannot be completed immediately will fail.
...

So we must not use timeouts in HttpServer.

This has caused problems on Mac OS X for a long time and we tried to address them by retrying on socket.error.EAGAIN (Resource temporarily unavailable).

Lately, this has also make a test fail for the webdav plugin (namely test_readv_with_adjust_for_latency) which is using unsually (for the test suite) big files (200K and then 1M). And for these sizes the retry workaround just fails.

Now, it seems that originally this timeout was introduced to avoid hanging the test suite.

I think this is a different problem that should be addressed by the test suite itself in a more general way.

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → v-ladeuil
status: Confirmed → In Progress
Vincent Ladeuil (vila)
Changed in bzr:
status: In Progress → Fix Committed
Vincent Ladeuil (vila)
Changed in bzr:
milestone: none → 0.92
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.