File uploads failing with Firefox 2 - Mozilla

This is a discussion on File uploads failing with Firefox 2 - Mozilla ; We've experiencing a problem with our website wherein users are sometimes (but not always) unable to upload files when using Firefox 2 (minor version doesn't matter). These are standard form method="post" enctype="multipart/form-data" uploads with input type="file" elements -- no javascript ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: File uploads failing with Firefox 2

  1. File uploads failing with Firefox 2

    We've experiencing a problem with our website wherein users are
    sometimes (but not always) unable to upload files when using Firefox 2
    (minor version doesn't matter). These are standard form method="post"
    enctype="multipart/form-data" uploads with input type="file" elements
    -- no javascript or other browser-side shenanigans involved.

    The failure happens more regularly with the Windows version of FF2
    than with the Linux version, but depending on the size of the uploaded
    file we've had it happen with Linux as well. The bigger the file, the
    more likely this is to occur, but there isn't any particular file size
    where it begins happening. It also seems to be more likely to happen
    with https: URLs.

    The symptom is that the Apache server sees the form post split into
    two parts. That is, we get an entry in the access log for the
    original URL like this:

    64.84.47.131 - - [11/Jul/2007:21:19:22 +0000] www.kcpreports.com
    "POST /mailings_upload_docs.xpml HTTP/1.1" 200 10580 "https://
    www.kcpreports.com/..." "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-
    US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" [18070]

    And simultaneously we get an entry in the error log like this:

    [Wed Jul 11 21:19:22 2007] [error] [client 64.84.47.131] request
    failed: erroneous characters after protocol string: content here>

    (where in case it isn't obvious I've edited the error message to
    redact the actual chunk of uploaded data).

    For some reason the server is seeing EOF on the first request in the
    middle of the upload, and then the rest of the upload is interpreted
    as a new request. This only happens with FF2 -- the website has been
    running for literally years and has never had a problem with other
    browsers.

    Any clues as to what is going on or how we can prevent it would be
    appreciated.


  2. Re: File uploads failing with Firefox 2

    barton.schaefer wrote:
    > We've experiencing a problem with our website wherein users are
    > sometimes (but not always) unable to upload files when using Firefox 2
    > (minor version doesn't matter). These are standard form method="post"
    > enctype="multipart/form-data" uploads with input type="file" elements
    > -- no javascript or other browser-side shenanigans involved.
    >
    > The failure happens more regularly with the Windows version of FF2
    > than with the Linux version, but depending on the size of the uploaded
    > file we've had it happen with Linux as well. The bigger the file, the
    > more likely this is to occur, but there isn't any particular file size
    > where it begins happening. It also seems to be more likely to happen
    > with https: URLs.
    >
    > The symptom is that the Apache server sees the form post split into
    > two parts. That is, we get an entry in the access log for the
    > original URL like this:
    >
    > 64.84.47.131 - - [11/Jul/2007:21:19:22 +0000] www.kcpreports.com
    > "POST /mailings_upload_docs.xpml HTTP/1.1" 200 10580 "https://
    > www.kcpreports.com/..." "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-
    > US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4" [18070]
    >
    > And simultaneously we get an entry in the error log like this:
    >
    > [Wed Jul 11 21:19:22 2007] [error] [client 64.84.47.131] request
    > failed: erroneous characters after protocol string: > content here>
    >
    > (where in case it isn't obvious I've edited the error message to
    > redact the actual chunk of uploaded data).
    >
    > For some reason the server is seeing EOF on the first request in the
    > middle of the upload, and then the rest of the upload is interpreted
    > as a new request. This only happens with FF2 -- the website has been
    > running for literally years and has never had a problem with other
    > browsers.
    >
    > Any clues as to what is going on or how we can prevent it would be
    > appreciated.


    If it is possible, you could try monitoring the traffic using for
    example wireshark ( Free, open source, http://www.wireshark.org/ ). If
    you manage to get a good trace of the problem on both client side and
    server side, comparing the results could reveal is the problem that
    Firefox is sending bogus data, or is there a network problem or is
    Apache just reading it incorrectly.

    If the problem is hard to reproduce, this could be hard to do. But it is
    all I can come up with. If you manage to figure out that Firefox is the
    reason, you should submit a bug report about the issue. You could submit
    it even now as developers might have some other ideas how to trace it,
    but most likely they will need more info about how to reproduce the
    problem.

    --
    Solutions for issues with Firefox:
    http://kb.mozillazine.org/Category:Issues_%28Firefox%29

  3. Re: File uploads failing with Firefox 2

    On Jul 12, 8:29 am, Aggro wrote:
    >
    > If it is possible, you could try monitoring the traffic using for
    > example wireshark ( Free, open source,http://www.wireshark.org/). If
    > you manage to get a good trace of the problem on both client side and
    > server side, comparing the results could reveal is the problem that
    > Firefox is sending bogus data, or is there a network problem or is
    > Apache just reading it incorrectly.


    It's nearly impossible to do this because the connections are SSL-
    encrypted.

    Tracing a plain HTTP connection appears to show Firefox sending a
    correctly-formatted multipart/form-data stream.

    What I'm hoping is that someone can explain what FF2 might be doing
    differently from FF1.5 or before that would be related to this kind of
    problem. And, if possible, suggest a way to force FF2 to revert to
    something resembling the older behavior, so that e.g. we can tell our
    users to frob an about:config setting or the like as a workaround
    until we can come up with a universal solution.


  4. Re: File uploads failing with Firefox 2

    barton.schaefer wrote:

    > Tracing a plain HTTP connection appears to show Firefox sending a
    > correctly-formatted multipart/form-data stream.


    Obviously you need to trace a connection which fails. I'm not sure how
    often that happens, which is why I said that it could be difficult.

    > What I'm hoping is that someone can explain what FF2 might be doing
    > differently from FF1.5 or before that would be related to this kind of
    > problem. And, if possible, suggest a way to force FF2 to revert to
    > something resembling the older behavior, so that e.g. we can tell our
    > users to frob an about:config setting or the like as a workaround
    > until we can come up with a universal solution.


    I can't see that anything has been done related to uploading. If you
    want to, you can try to search the change logs (there is a search box on
    the left top corner):
    http://www.squarefree.com/burningedge/


    Has the upload failed when you have uploaded the file from local network
    during low traffic hours? For me, random failures indicate network
    problems. But it sounds strange that only Firefox 2.0 would fail. Is it
    possible that because the problem is random, IE users just haven't
    reported it?

    Also few things I found that have fixed upload problems:
    - Removing .htaccess
    - Clearing browser cache/cookies.

    --
    Solutions for issues with Firefox:
    http://kb.mozillazine.org/Category:Issues_%28Firefox%29

  5. Re: File uploads failing with Firefox 2

    On Jul 12, 1:45 pm, Aggro wrote:
    >
    > I can't see that anything has been done related to uploading.


    More likely it's a lower-level change to the way http or even tcp is
    used, rather than something specific to file upload. It just happens
    that only when uploading a file is the volume of data being
    transmitted sufficient to trigger the problem.

    > Has the upload failed when you have uploaded the file from local network
    > during low traffic hours?


    Once we have an example file that fails, the same file ALWAYS fails,
    as long as it's being uploaded from the same OS as the original
    failure (a file that failed when uploaded from windows XP won't always
    fail from linux, but it'll fail from any other windows XP with FF2 --
    we've had customers FTP us a file so we can test, and we've scp'd it
    around to different machines and it always fails). The ONLY browser
    where it fails is FF2; IE6 or IE7 or FF1.5 will always upload it, even
    from a machine where FF2 repeatably fails. Network traffic or system
    load has nothing to do with it; when we have a known-"bad" file, we
    can even reproduce the failure against our otherwise-idle staging
    servers as well as against the live site.

    My guess is that there's some optimization that FF2 is doing to try to
    push the data at the server as fast as it possibly can, which under
    unlikely circumstances causes the server to see a break in the middle
    of the stream.


  6. Re: File uploads failing with Firefox 2

    barton.schaefer wrote:

    > Once we have an example file that fails, the same file ALWAYS fails,
    > as long as it's being uploaded from the same OS as the original
    > failure (a file that failed when uploaded from windows XP won't always
    > fail from linux, but it'll fail from any other windows XP with FF2 --
    > we've had customers FTP us a file so we can test, and we've scp'd it
    > around to different machines and it always fails). The ONLY browser
    > where it fails is FF2; IE6 or IE7 or FF1.5 will always upload it, even
    > from a machine where FF2 repeatably fails. Network traffic or system
    > load has nothing to do with it; when we have a known-"bad" file, we
    > can even reproduce the failure against our otherwise-idle staging
    > servers as well as against the live site.


    At this point, I think it is best for you to submit a bug report to get
    proper help directly from the developers:
    https://bugzilla.mozilla.org/enter_b...&format=guided

    --
    Solutions for issues with Firefox:
    http://kb.mozillazine.org/Category:Issues_%28Firefox%29

  7. Re: File uploads failing with Firefox 2

    On Jul 13, 8:54 am, Aggro wrote:
    >
    > At this point, I think it is best for you to submit a bug report to get
    > proper help directly from the developers:https://bugzilla.mozilla.org/enter_b...&format=guided


    It may be the same as this one:

    https://bugzilla.mozilla.org/show_bug.cgi?id=374641

    Then again, my failure is more repeatable than that bug would indicate.


+ Reply to Thread