Note that there are some explanatory texts on larger screens.

plurals
  1. POLarge POST data is corrupted when using Django/PyISAPIe/IIS
    text
    copied!<p>I'm running into a problem with large POST data (>16384 bytes) when using Django 1.2.3, PyISAPIe v1.1.0-rc4, and IIS 7.5.</p> <p>For example, when submitting approx. 60kB of form data using POST, the following happens:</p> <ul> <li>The first 16kB block of POST data are correct</li> <li>The next 16kB block is a repeat of the first block</li> <li>The next 16kB is another repeat of the first block</li> <li>The rest (&lt;16kB) is correct again</li> </ul> <p>The interesting part is that when using <code>content-type="multipart/form-data"</code>, it works fine.</p> <p>Using this information I tracked down the likely location of the bug to WSGIRequest._get_raw_post_data in django\core\handlers\wsgi.py, which handles the <code>content-type="multipart/form-data"</code> separately from the default (no content-type) case.</p> <p>Both cases read from <code>self.environ['wsgi.input']</code>, which is set to the PyISAPIe object. The difference is that the default case seems to read in chunks of 16kB, whereas the multipart handler seems to read in chunks of just under 2GB.</p> <p>I don't know enough about C and the Python interface for C to dig in further, but I'm guessing the bug is somewhere in PyISAPIe in the ReadClient function in ReadWrite.cpp. </p> <p>My current workaround is to add <code>content-type="multipart/form-data"</code> to forms that may product more than 16kB of data.</p> <p>Has anybody run into this as well, or does anybody know how to determine if the bug is in fact in PyISAPIe?</p> <p>Thank you!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload