https://issues.apache.org/bugzilla/show_bug.cgi?id=47861
Summary: File upload has newlines inserted in file (about every
32k)
Product: Apache httpd-2
Version: 2.3-HEAD
Platform: PC
OS/Version: OpenVMS
Status: NEW
Severity: normal
Priority: P2
Component: mod_cache
AssignedTo: [email protected]
ReportedBy: [email protected]
I am using an apache server with perl on a VMS platform, and I get the newline
character inserted just before the 32k mark is reached. Both Mozilla and IE
have similar results, just slightly different locations. The newline character
is inserted within 1k of the 32k byte marker, before I can make my first read.
After that, the newline character is inserted inserted randomly (about once
every 32k).
For a test files, I created an image with vertical stripes. This gives me a
quick visual check. I also created a binary file 32k in size which has
repeating blocks of 256 bytes starting from 0x00 to 0xff. Using a hex dump, I
can locate the shift in data.
I don't know if it is the Apache setup, or if a cache is inserting the newline
characters.
I have tried to set the cache-control (http) when I create the form but only
the "cache-control: no-cache" has any effect where the result is a truncating
the output to about 32k, roughly where the first newline was being inserted.
The form is pretty standard stuff
----------
<script language="Javascript" type = "text/javascript">
function openWindow()
{
newWindow = window.open("", "uploadWin",
"toolbar=no, location=no, scrollbars=no, width=500, height=200" );
}
function submitUpload(frm)
{
if(frm.uploadFile.value =="")
{
alert("File is not specified");
frm.uploadFile.focus();
frm.uploadFile.select();
return false;
}
else
{
frm.action="/bin/upload";
return true;
}
}
function closeWindow()
{
this.close();
return false;
}
</script>
<form id="frmUpload" method="post" enctype="multipart/form-data"
onsubmit="return submitUpload(this);" >
<table border="0">
<caption><strong>Upload File</strong><br><sup>(filesize < 32k)</sup>
</caption>
<<<< snip >>>>
<tr>
<td colspan="4">File:
<input type="file" name="uploadFile" size="45">
</td>
</tr>
<tr><td> </td></tr>
<tr>
<td> </td>
<td>
<input size="20" name="Submit" type="Submit"
value="Upload" >
</td>
<td>
<input size="20" name="Close" type="Reset"
value="Close" onclick="return closeWindow();" >
</td>
</tr>
</table>
</form>
-----------
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]