Paul Theodoropoulos writes:

I'm baffled. I haven't tested this with other browsers, since that's not the issue as i see it - most people use MSIE, like it or not. I'm testing with MSIE 6.0.2800.1106.xpsp1.020828-1920, the most recent version available. I have tried going into the 'advanced settings' and unchecking "Use http1.1". nothing.

Can someone provide an explanation for this? Have I missed something? can it be fixed?
Whatever it is, it is particular to your platform or server. I can download the entire message, save it in the local account, and open the attachments just fine. Your server closes the connection without downloading anything.

=======================

GET /sqwebmail.cgi/login/testuser%40smileglobal.com.authdaemon/... HTTP/1.0
Host: sqwebmail.smileglobal.com

HTTP/1.1 200 OK
Date: Sun, 26 Jan 2003 21:37:46 GMT
Server: Apache/1.3.27 (Unix) PHP/4.3.0
Cache-Control: no-store
Pragma: no-cache
Connection: close
Content-Type: image/jpeg; charset="iso-8859-1"; name="DSCF0076.JPG"

Connection closed by foreign host.

=======================

This tells me that the download code does start to run, but something stops it. The interesting thing is that the most of the same code is used to download the entire message; and as I said that happened without any problems.

I'll bet this is your problem:

static int download_func(const char *p, size_t cnt, void *voidptr)
{
while (cnt--)
if (putchar(*p++) == EOF)
{
cleanup();
fake_exit(0);
}
return (0);
}

I bet that your putchar() improperly sign-extends char values, so an occurence of binary 0xFF gets sign-extended to EOF.

Change that to putchar((int)(unsigned char)*p++)



Reply via email to