unread
WTF?? Appearently the attachment is getting stripped off somewhere along
the way...
Index: ext/ftp/ftp.c
RCS file: /repository/php-src/ext/ftp/ftp.c,v
retrieving revision 1.106
diff -u -r1.106 ftp.c
--- ext/ftp/ftp.c 5 Oct 2004 23:53:09 -0000 1.106
+++ ext/ftp/ftp.c 2 Feb 2005 19:09:28 -0000
@@ -846,16 +846,25 @@
* Everything Else \n
*/
#ifdef PHP_WIN32
- while ((s = strpbrk(ptr, "\r\n"))) {
- if (*s == '\n') {
-
php_stream_putc(outstream, '\r');
- while ((s = strpbrk(ptr, "\r\n")) && (s < e)) {
- /* for some reason some servers prefix a \r before a \n,
-
* resulting in a \r\r\n in the buffer when
-
* the remote file already has windoze style line endings.
-
*/
- php_stream_write(outstream, ptr, (s - ptr));
- php_stream_putc(outstream, '\r');
- php_stream_putc(outstream, '\n');
- if (*s == '\r' && *(s + 1) == '\r' && *(s + 2) == '\n') {
-
} else if (*s == '\r' && *(s + 1) == '\n') {s += 3;
-
s += 2;
- } else if (*s == '\r') {
-
s++;
- } else if (*s == '\n') {
s++;
- }
- s++;
- php_stream_write(outstream, ptr, (s - ptr));
- if (*(s - 1) == '\r') {
-
}php_stream_putc(outstream, '\n');
ptr = s;
}