You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2009/09/17 18:16:14 UTC

DO NOT REPLY [Bug 47861] New: File upload has newlines inserted in file (about every 32k)

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: bugs@httpd.apache.org
        ReportedBy: harold.brauer@megasys.com


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: &nbsp;
               <input type="file" name="uploadFile" size="45">
            </td>  
         </tr>

         <tr><td>&nbsp;</td></tr>
         <tr>
            <td>&nbsp;</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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

hbrauer <ha...@megasys.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

--- Comment #9 from hbrauer <ha...@megasys.com> 2009-10-15 07:08:24 UTC ---
Thank you for at least pointing me in the right direction.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

hbrauer <ha...@megasys.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
           Severity|normal                      |critical

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

--- Comment #5 from hbrauer <ha...@megasys.com> 2009-10-07 13:09:04 PDT ---
Correction: I am able to ftp to this machine. I just cannot do it from my
Windows PC, however I can from a Sun workstation.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

--- Comment #4 from hbrauer <ha...@megasys.com> 2009-10-07 10:44:14 PDT ---
(In reply to comment #2)
> Are the newlines inserted during the upload or the download?
> 

The newline characters are inserted on upload.  Download works fine. 
I have uploaded files using ftp and downloaded the via http (i.e putting the
URL link to the file). I have no problem downloading files.

> What happens if you don't use/load cache?
> 

If I try to prevent the cache from storing data, the file is truncated. 
If I don't try to control the cache, I get the entire file downloaded with the
newline characters inserted randomly.

> Please attach your httpd.conf file so we can see your configuration.
> 

OK.

> What is /bin/upload?  What happens if you replace it with some alternative way
> of handling uploads?

/bin/upload is my perl script which I use to handle the upload request. 

I don't have trouble coping files from one VMS host to another.  The ftp
protocol is turned off on the host where the webserver resides.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

--- Comment #7 from hbrauer <ha...@megasys.com> 2009-10-14 09:51:28 UTC ---
(In reply to comment #6)
> Here's some information that seems to be missing or incorrect:
> 
> * the httpd.conf file in a format that we can read (not a VMS file)
> * the suspected component

I assumed the VMS format would have been appropriate, being this is a VMS
platform. I will put it in a file you can read with notepad.  

> The bug is filed against mod_cache, but mod_cache isn't loaded in the provided
> httpd.conf file.  Is mod_cache built-in?  I think the references to "cache" in
> the discussion are the browser cache.

I assumed that if the server uses mod perl, it uses mod_cache.  There does not
seem to be any reference to cache in the httpd.conf.  As usual, the information
for the VMS platform is hard to find!

The http cache-control, the text which preceeds the <HTML> tags, would affect
the either the server cache-control or the browser cache-control.  I assumed
that if either of these two cache were the source of the newline character
being inserted, then I could turn off this undesirable newline.  It has not
been the case.

> All I can tell for sure is that there is some corruption somewhere between the
> browser posting the data to httpd and Perl handing data to your Perl script.

Agreed. The endpoints, server/client,  are the places I tend to check first.  I
don't know where else I should be checking. 

> * the exact httpd version number
> The httpd.conf file refers to version 2.0.x documentation (but also has some
> 1.3-isms).  The bug is filed against version 2.3-head.
> * who is supplying this server?
> httpd 2+ doesn't support VMS.  (e.g., "AcceptMutex vmsdlm", VmsServerStartup,
> etc.)  It is cool that somebody taught it to support VMS, but we don't know
> what code you are running.  I'm not aware of anyone in httpd development that
> uses VMS and can try to reproduce this.
> * can you reproduce on another platform (Linux, Solaris, Windows, *BSD)?

The html help for httpd has "http://www.apache.org/licenses/LICENSE-2.0"
I just assumed that this was the latest and greatest. But for VMS, V2.0, must
be the latest version.


No.  We have Apache only installed the VMS hosts.  This is where we want it
running.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

Jeff Trawick <tr...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #8 from Jeff Trawick <tr...@apache.org> 2009-10-14 10:14:02 UTC ---
It seems that this web server is the HP Secure Web Server (based on Apache
2.0.ancient and apparently modified in significant ways).

See http://h71000.www7.hp.com/openvms/products/ips/apache/csws.html.

We can't support that here.

The mysterious newlines may have something to do with STREAM_LF record format,
which is somehow addressed by release 2.1 of this HP web server.  Maybe you can
find a definitive description of that somewhere.

If you can't get help from HP (this is a commercially supported product), maybe
one of the httpd user mailing lists can be used to help narrow down the
suspected component further.  If the suspected component is indeed the web
server, we still can't address it here.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

--- Comment #3 from hbrauer <ha...@megasys.com> 2009-10-07 10:42:27 PDT ---
Created an attachment (id=24358)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24358)
httpd.conf (vms file)

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

hbrauer <ha...@megasys.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|PC                          |DEC

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

--- Comment #1 from hbrauer <ha...@megasys.com> 2009-09-21 14:35:15 PDT ---
Created an attachment (id=24299)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24299)
A jpeg with vertical stripes.

When the newline is inserted, the stripes are offset and the colors are
altered.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

Dan Poirier <po...@pobox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #2 from Dan Poirier <po...@pobox.com> 2009-09-23 07:43:59 PDT ---
Are the newlines inserted during the upload or the download?

What happens if you don't use/load cache?

Please attach your httpd.conf file so we can see your configuration.

What is /bin/upload?  What happens if you replace it with some alternative way
of handling uploads?

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 47861] File upload has newlines inserted in file (about every 32k)

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47861

--- Comment #6 from Jeff Trawick <tr...@apache.org> 2009-10-13 13:08:33 UTC ---
Here's some information that seems to be missing or incorrect:

* the httpd.conf file in a format that we can read (not a VMS file)
* the suspected component
The bug is filed against mod_cache, but mod_cache isn't loaded in the provided
httpd.conf file.  Is mod_cache built-in?  I think the references to "cache" in
the discussion are the browser cache.
All I can tell for sure is that there is some corruption somewhere between the
browser posting the data to httpd and Perl handing data to your Perl script.
* the exact httpd version number
The httpd.conf file refers to version 2.0.x documentation (but also has some
1.3-isms).  The bug is filed against version 2.3-head.
* who is supplying this server?
httpd 2+ doesn't support VMS.  (e.g., "AcceptMutex vmsdlm", VmsServerStartup,
etc.)  It is cool that somebody taught it to support VMS, but we don't know
what code you are running.  I'm not aware of anyone in httpd development that
uses VMS and can try to reproduce this.
* can you reproduce on another platform (Linux, Solaris, Windows, *BSD)?

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org