Thank you for the reply!
I don't understand these things well, so bear with me, please. I'll
try to respond as I can.
I now went for two different error cases, and indeed, in both cases
(and more repeats of the same errors) they were cut at exactly 32768
bytes.
The place in OpenERP's Python code that prepares the response, I
found, is this:
r = werkzeug.wrappers.Response(body, headers=[('Content-Type', mime),
('Content-Length', len(body))])
return r
So, I guess, at least at this point the content should be whole, or at
least the given content length in the header should match the content
itself.
What should I search for to find where that response is actually sent
to the browser? Or is it already happenning at this point?
Janis
On Jun 7, 4:44 pm, Simon Sapin <[email protected]> wrote:
> Le 07/06/2012 15:12, Jānis a écrit :
>
> > HTTP debugging proxy Fiddler informs that, for example, the HTTP
> > header says the content length is 39942 bytes, however, the actual
> > lengh is 32768, and in the text view I can clearly see that the
> > response, which is JSON code, gets cut off unexpectedly.
>
> 32768 is 2^15, this is suspicious.
>
> I have had a similar problem in Werkzeug, but it was with file uploads,
> not responses.
>
> It was because werkzeug.datastructures.FileStorage.save has a default
> buffer size of 16k. I was saving to a file object, and reading that
> object without flushing the writes first. So the files would end up
> being 16k, 32k or sometimes 48k, with end missing. However, your problem
> is likely not the same, only similar.
>
> Can you track down the code that generates the response that is cut off?
> Is there a WSGI middleware between that code and Werkzeug’s server?
>
> I see no such buffer in Werkzeug’s server
> itself:https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/serving.py...
>
> Regards,
> --
> Simon Sapin
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en.