IE sends incorrect Content-Length header value when POSTing a growing file

Won’t fix Issue #1288105


Jan 5, 2015
This issue is public.
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce


Repro Steps:

This is easier to reproduce when you have a larger file being written-to continuously, since there is more time for the file to have grown since IE began sending the file. If IE is able to send the whole file between writes/flushes to the file, then the issue will not occur. Accordingly, if the other application writing to the file is writing quickly/repeatedly, the file doesn’t even need to be 1MB in order to reproduce the issue reliably.

I will attach a simple sample ASP.NET site that can be installed in IIS, and accepts only a file upload in a form. I will also attach a simple VBS script that continuously writes to a file for up to 100MB before deleting the file and starting over.

To reproduce, simply run the script, wait for test.txt to grow to a few hundred KB, then upload the file to the site. You’ll see that the file doesn’t actually arrive; the request is rejected.

Expected Results:

Chrome respects the Content-Length header value it previously sent: it stops reading from the local file when the number of bytes is reached in the Content-Length header. IE should work similarly.

It should be noted that while Chrome’s behavior is certainly better than IE behavior, there is a drawback. Since the upload silently succeeds, this behavior can result in file truncation and corruption issues on the receiving end.

Ideally, IE should be able to reliably begin upload a growing file, and if it grows by the time it reaches the limit, this can be detected and IE can warn the user. The user should have the option to abandon the upload/POST to avoid uploading a bad or incomplete file. If it were to do that, IE would be the most reliable browser for file uploads.

Actual Results:

Dev Channel specific:



0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Kamen M.”

      Changed Assigned To to “Venkat K.”

      Changed Assigned To from “Venkat K.” to “Krunal S.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Krunal S.” to “IE F.”

      Changed Status from “Confirmed” to “Won’t fix”

      Changed Assigned To from “IE F.” to “Krunal S.”

      Changed Status from “Won’t fix”

      Changed Assigned To from “Krunal S.” to “David W.”

      Changed Assigned To from “David W.” to “IE F.”

      Changed Status to “Won’t fix”

      Changed Assigned To to “David W.”

      Changed Status from “Won’t fix”

      Changed Status to “Won’t fix”

    You need to sign in to your Microsoft account to add a comment.

    Sign in