Comment 12 for bug 1243773

Revision history for this message
Wennaël LOONIS (wloonis) wrote :

Hello,
I encountered the same problem.
With OpenErp 7.x, when the error is displayed in plain/text (via Werkzeug ServerInternalError), the message contains:
<! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 3.2 Final // EN">
<Title> 500 Internal Server Error </ title>
<H1> Internal Server Error </ h1>
{My json}

The content is interpreted on the client side to display a correct message.

With Werkzeug 0.9.x, the content is changed. Special characters are encoded.
We have:

<! DOCTYPE HTML PUBLIC "- // W3C // DTD HTML 3.2 Final // EN">
<Title> 500 Internal Server Error </ title>
<H1> Internal Server Error </ h1>
& Quot; My json & quot;

This causes a client side error.

You must patch Openerp http.py and wsgi_server.py for this to work. In my case, I memorize the content of the initial message, after the Werzeug encoding, I then postpone the initial one

Regards,
Wennaël