]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Win32: Eliminate blocking network i/o in the Windows code paths. In practice
authorBill Stoddard <stoddard@apache.org>
Sat, 9 Feb 2002 14:51:30 +0000 (14:51 +0000)
committerBill Stoddard <stoddard@apache.org>
Sat, 9 Feb 2002 14:51:30 +0000 (14:51 +0000)
only sends() were ever blocking. That any network i/o was ever blocking
could be considered a bug in Apache.

This patch seems to work around a bug in WinXP that causes network write
data corruption. The bug appears to be tickled by the combined use of
WSADuplicateSocket and blocking sends().  Allan Edwards is submitting a
bug report to Microsoft.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@93353 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/main/buff.c

index f23646a0558d4a84780c86f45faf02148db12194..04b63df4ad69b5fe90bfbc0cc57e39d4d354a2c1 100644 (file)
@@ -1,5 +1,10 @@
 Changes with Apache 1.3.24
-
+  *) Win32: Work around a bug in Windows XP that caused data
+     corruption on writes to the network. The WinXP bug
+     is tickled by the combined use of WSADuplicateSocket 
+     and blocking send() calls.
+     [Bill Stoddard, Bill Rowe, Allan Edwards, Szabolcs Szakacsits]
+     
   *) Add 'IgnoreCase' keyword to the IndexOptions directive;
      if active, upper- and lower-case letters are insignificant
      in ordering.  In other words, all A* and a* files will be
index 8c5fdc2a9558721d31d7c76caa86393389bcb765..189e074af4affa61662f83ff978a01626ec45535 100644 (file)
@@ -137,8 +137,7 @@ API_EXPORT(int) ap_sendwithtimeout(int sock, const char *buf, int len, int flags
     int rv;
     int retry;
 
-    if (!(tv.tv_sec = ap_check_alarm()))
-       return (send(sock, buf, len, flags));
+    tv.tv_sec = ap_check_alarm();
 
     rv = ioctlsocket(sock, FIONBIO, (u_long*)&iostate);
     iostate = 0;
@@ -204,8 +203,7 @@ API_EXPORT(int) ap_recvwithtimeout(int sock, char *buf, int len, int flags)
     int rv;
     int retry;
 
-    if (!(tv.tv_sec = ap_check_alarm()))
-       return (recv(sock, buf, len, flags));
+    tv.tv_sec = ap_check_alarm();
 
     rv = ioctlsocket(sock, FIONBIO, (u_long*)&iostate);
     iostate = 0;