http://bugs.winehq.org/show_bug.cgi?id=7685
damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |damjan.jov@gmail.com Status|UNCONFIRMED |NEW Ever Confirmed| |1
------- Additional Comments From damjan.jov@gmail.com 2007-15-03 00:35 ------- Created an attachment (id=5361) --> (http://bugs.winehq.org/attachment.cgi?id=5361&action=view) modify send() to block until entire buffer is sent
Ok so I couldn't wait until the weekend :-).
It looks like on Windows, for non-overlapped non-blocking stream sockets, send()/WSASend[To]() block until the entire buffer is sent, while on Linux, it tries to return as soon as any bytes have been sent. Code written *the proper way* will work on any operating system, while some heathens write code that doesn't fully check the return value of send() and resends the remaining bytes, so outside Windows, every send() can skip some bytes, leading to problems like you see here. (What an evil ploy - by modifying the semantics of send(), code written for other operating systems can be ported easily to Windows, but code written for Windows with those assumptions will need to be rewritten to work properly anywhere else).
My patch modifies WSASendTo to try send everything, like Windows does. Please try it and let me know whether it works.
------- Additional Comments From zthg4821@gmail.com 2007-15-03 09:13 ------- Created an attachment (id=5371) --> (http://bugs.winehq.org/attachment.cgi?id=5371&action=view) winsock-patched-trace.tar.bz2
Sorry to report the patch from comment #7 made no difference from a usage standpoint, the behavior is identical to before.
------- Additional Comments From damjan.jov@gmail.com 2007-16-03 02:34 ------- I just tested it, and if you reduce the lo network interface's MTU to 1500 (ifconfig lo mtu 1500), it does hang even when accessing pages on localhost.