Mailing List Archive

[Bug 9185] - Downloaded files always corrupt on CYGWIN
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9185>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9185

Downloaded files always corrupt on CYGWIN





------- Additional Comments From jwoolley@apache.org 2002-05-17 01:15 -------
If the WinXP thing isn't the problem, how about the following changes?

Index: http_core.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
retrieving revision 1.311
diff -u -d -r1.311 http_core.c
--- http_core.c 21 Mar 2002 14:52:55 -0000 1.311
+++ http_core.c 17 May 2002 01:12:25 -0000
@@ -3834,7 +3834,7 @@
return METHOD_NOT_ALLOWED;
}

-#if defined(OS2) || defined(WIN32) || defined(NETWARE)
+#if defined(OS2) || defined(WIN32) || defined(NETWARE) || defined(CYGWIN)
/* Need binary mode for OS/2 */
f = ap_pfopen(r->pool, r->filename, "rb");
#else
Index: open.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/open.c,v
retrieving revision 1.94
diff -u -d -r1.94 open.c
--- open.c 20 Mar 2002 08:54:42 -0000 1.94
+++ open.c 17 May 2002 01:13:13 -0000
@@ -152,6 +152,11 @@
if (flag & APR_TRUNCATE) {
oflags |= O_TRUNC;
}
+#ifdef O_BINARY
+ if (flag & APR_BINARY) {
+ oflags |= O_BINARY;
+ }
+#endif

if (perm == APR_OS_DEFAULT) {
(*new)->filedes = open(fname, oflags, 0666);

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org