[jira] Created: (OFBIZ-1752) JSON event handlers send truncated response when it contains accented chars

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1752) JSON event handlers send truncated response when it contains accented chars

Nicolas Malin (Jira)
JSON event handlers send truncated response when it contains accented chars
---------------------------------------------------------------------------

                 Key: OFBIZ-1752
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1752
             Project: OFBiz
          Issue Type: Bug
          Components: framework
    Affects Versions: SVN trunk
            Reporter: Nicolas Mervaillie
            Priority: Minor
         Attachments: contentLength.patch

The JSON event handlers do not set correct content length  when the response contains special characters (chars that translate to more then one byte in unicode),
This is because the content length of the HTTP response is set to the number of chars and not the number of bytes to be transmitted.
See attached patch

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1752) JSON event handlers send truncated response when it contains accented chars

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Mervaillie updated OFBIZ-1752:
--------------------------------------

    Attachment: contentLength.patch

> JSON event handlers send truncated response when it contains accented chars
> ---------------------------------------------------------------------------
>
>                 Key: OFBIZ-1752
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1752
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Mervaillie
>            Priority: Minor
>         Attachments: contentLength.patch
>
>
> The JSON event handlers do not set correct content length  when the response contains special characters (chars that translate to more then one byte in unicode),
> This is because the content length of the HTTP response is set to the number of chars and not the number of bytes to be transmitted.
> See attached patch

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1752) JSON event handlers send truncated response when it contains accented chars

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1752.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 4.0
                   SVN trunk
         Assignee: Jacques Le Roux

Thanks Nicolas,

Your slightly modified patch is in trunk rev. 650083 release4.0. 650086 (only JSONServiceEventHandler.java others don't exist)

I have added throw new EventHandlerException("Problems with Json encoding", e); in place of only //swallow



> JSON event handlers send truncated response when it contains accented chars
> ---------------------------------------------------------------------------
>
>                 Key: OFBIZ-1752
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1752
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Nicolas Mervaillie
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: contentLength.patch
>
>
> The JSON event handlers do not set correct content length  when the response contains special characters (chars that translate to more then one byte in unicode),
> This is because the content length of the HTTP response is set to the number of chars and not the number of bytes to be transmitted.
> See attached patch

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.