text file attachments in gnatsweb corrupted on Windows
From:
Jo A Wahle
Subject:
text file attachments in gnatsweb corrupted on Windows
Date:
Mon, 12 Jun 2006 10:09:10 -0500
In gnatsweb, when a user attaches a
.txt file from a Windows machine, it gets converted automatically to UNIX
line-endings when it is saved in the PR. When a user downloads the file
(still on Windows), it's not getting converted back. I tried to change
download_attachments to do:
[...]
print_header(-type => $ctype,
[...]
where $ctype is what I extracted from
$$hash_ref{'Content-Type'}, but it still isn't converting the line-endings.
(I even tried setting $ctype directly to 'text/plain' in case I had incorrectly
parsed $$hash_ref{'Content-Type'} but I got the same result.) It doesn't
matter which browser I use. I tried changing it to 'text/html' and it automatically
tried to open the file in a browser instead of in Notepad, so it is picking
up on that header.
Has anyone else encountered this? I
don't know a lot about the http headers or how & when it's converting
the line-endings, but I can't see that the gnatsweb.pl code is doing the
line-ending conversion, so it must have something to do with the http code,
right?
--
Jo Wahle, Software Engineer, Engineering Support, SAIC
(Science Applications International Corporation – www.saic.com)
Contractor to U.S. Geological Survey – EROS, Sioux Falls SD 57198
(Earth Resources Observation and Science – eros.usgs.gov)
[Prev in Thread]
Current Thread
[Next in Thread]
text file attachments in gnatsweb corrupted on Windows,
Jo A Wahle<=