Re: Django/CherryPy problem with POST data

2010-11-02 Thread Russell Keith-Magee
On Tue, Nov 2, 2010 at 4:19 AM, Ivan Sagalaev wrote: > On 11/01/2010 11:21 AM, Mark wrote: >> >> Ticket #14594 >> > > From a quick look it can be fixed in two ways: > > - HttpRequest.raw_post_data can always explicitly ask for content_length > bytes. If

Re: Django/CherryPy problem with POST data

2010-11-01 Thread Ivan Sagalaev
On 11/01/2010 11:21 AM, Mark wrote: Ticket #14594 From a quick look it can be fixed in two ways: - HttpRequest.raw_post_data can always explicitly ask for content_length bytes. If content_length is absent just treat it as 0. - WSGIRequest can wra

Re: Django/CherryPy problem with POST data

2010-11-01 Thread Ivan Sagalaev
On 11/01/2010 08:44 AM, Russell Keith-Magee wrote: The only changes I'm aware of making were related to getting readline() to behave correctly. The patch as submitted didn't return the right values for the readline(len) case. Which call to read() are you saying is wrong? Sorry, my memory has fa

Re: Django/CherryPy problem with POST data

2010-11-01 Thread Mark
Steps to reproduce Ticket #14594 I used a virtualenv running Python 2.7, but I don't think the Python version matters # Install or make sure you are using Django trunk >= 14394 pip install CherryPy # 3.1.2 django-admin.py startproject newbug cd newbug python manage.py runserver # verify on port 8

Re: Django/CherryPy problem with POST data

2010-11-01 Thread Mark
>Sounds like a ticket is called for. Ticket #14594 >To aid the debugging process, if you can provide a complete standalone >example (or at least a complete set of duplication instructions), that >would be most helpful. Working on this now. --Mark --

Re: Django/CherryPy problem with POST data

2010-10-31 Thread Russell Keith-Magee
On Mon, Nov 1, 2010 at 2:20 PM, Ivan Sagalaev wrote: > On 11/01/2010 03:06 AM, Russell Keith-Magee wrote: >> >> Sounds like a ticket is called for. > > Mark, can you also CC: me ('isagalaev') on this ticket. I have an idea where > it can be broken. > > I remember that the initial patch was always

Re: Django/CherryPy problem with POST data

2010-10-31 Thread Ivan Sagalaev
On 11/01/2010 03:06 AM, Russell Keith-Magee wrote: Sounds like a ticket is called for. Mark, can you also CC: me ('isagalaev') on this ticket. I have an idea where it can be broken. I remember that the initial patch was always passing a `size` parameter into .read() of the underlying stream

Re: Django/CherryPy problem with POST data

2010-10-31 Thread Russell Keith-Magee
On Mon, Nov 1, 2010 at 7:58 AM, Mark wrote: > Changeset [14394], which introduced the HttpRequest.read feature, > breaks my Django project running behind CherryPy 3.1.2 on Python 2.7 > -- it hangs when trying to read request.POST data, specifically at: > > django/http/__init__.py, line 144: self._