Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-4577

[GSS] (6.4.z) RESTWorkItemHandler matches content type for equality AND Charset encoding @ RestWorkItemHandler

    Details

    • Fix Build:
      CR1
    • Steps to Reproduce:
      Hide

      1. Configure RESTWorkItemHandler with input "Content-Type" set to "application/json;charset=utf-8"
      Result: org.jbpm.workflow.instance.WorkflowRuntimeException: process:id - node:id] – Unable to find transformer for content type 'application/json;charset=utf-8'

      2. Configure RESTWorkItemHandler with input "Content-Type" set to "application/json"
      Result: Unsuccessful response from REST server (status 500, endpoint
      ...
      "Invalid UTF-8 middle byte 0xc3\n at [Source: org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl$InputStreamWrapper@33201dc7; line: 1, column: 223]"}

      Show
      1. Configure RESTWorkItemHandler with input "Content-Type" set to "application/json;charset=utf-8" Result: org.jbpm.workflow.instance.WorkflowRuntimeException: process:id - node:id] – Unable to find transformer for content type 'application/json;charset=utf-8' 2. Configure RESTWorkItemHandler with input "Content-Type" set to "application/json" Result: Unsuccessful response from REST server (status 500, endpoint ... "Invalid UTF-8 middle byte 0xc3\n at [Source: org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl$InputStreamWrapper@33201dc7; line: 1, column: 223] "}
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Develop a custom WorkItemHandler that can handle UTF-8 content types

      Show
      Develop a custom WorkItemHandler that can handle UTF-8 content types

      Description

      Request to backport JBPM-5133 and JBPM-5189 to 6.4.z

      RESTWorkItemHandler does not allow for charset encodings other than HTTPClient default of ISO 8859-1. This is an invalid encoding for application/json payloads, and causes parsing errors when sending UTF-8 characters.

      RESTWorkItemHandler needs to pattern match on Content-Type to select JSON or XML payload (instead of strict equality), and needs to forward charset parameter to HTTPClient.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swiderski.maciej Maciej Swiderski
                Reporter:
                djeremiah David Murphy
                Tester:
                Karel Suta
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: