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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 6.4.2
    • 6.4.0
    • jBPM Core
    • BPMS 6.4.0

    • CR1
    • Workaround Exists
    • Hide

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

      Show
      Develop a custom WorkItemHandler that can handle UTF-8 content types
    • 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] "}

    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.

      Attachments

        Activity

          People

            swiderski.maciej Maciej Swiderski (Inactive)
            djeremiah David Murphy (Inactive)
            Karel Suta Karel Suta
            Karel Suta Karel Suta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: