Le 08/06/2012 19:16, Jānis a écrit :
What should I search for to find the place where the content is
actually passed on from werkzeug's BaseResponse? I have looked here
and there but cannot understand this, yet.

Apparently you get a list of strings for the traceback. Try this to make it more readable:

print(''.join(the_list))

Now, from the start of the traceback we have threading.py, SocketServer.py, and werkzeug/serving.py. All that is the HTTP to WSGI server, you can ignore it.

(Unless there is a bug in Werkzeug or the Python stdlib. But I don’t think this is the case, this code is pretty straight forward.)

Actually serving.py would be a good place to check the length too. To know if this is a network problem or a bug in OpenORP.

Right here, have a look at the application_iter object:

https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/serving.py#L148

Using pdb might be easier than adding print statements everywhere. If the object is a list of string you can just check
sum(map(len, application_iter))

Otherwise you may have to check each call to write() and do the sum yourself:

https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/serving.py#L112


Now, if the length is correct in serving.py, this is most likely a network problem. Is this on localhost? Do you have a firewall or something that could interfere?

If the length is not correct in serving.py, the problem is somewhere between that and where the response is generated (where you have Content-Length set to len(body).) Looking at your traceback, this means in OpenERP. I’m not familiar with OpenERP so I can’t help much more thane that …

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.

Reply via email to