3 Replies Latest reply on Sep 3, 2018 10:24 AM by Olafur T

    ORDS 18.2 + Tomcat 7/8 problem RFC 7230 and RFC 3986

    Olafur T

      We just updated our test environment to ORDS 18.2 and APEX 18.1. As expected, APEX REST services are read-only.

       

      But we are running unto a problem migrating the APEX REST services to ORDS.

      So in the modal window "APEX REST Migration Warning" when I press "Migrate" the next page is a 400 error that I trace to Tomcat.

       

      From the catalina.out: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

       

      Looking at the URL there are letters that are nonconformant to those RFC's.

       

      &success_msg=QVBFWCBiYXNlZCBSRVNUZnVsIHNlcnZpY2VzIGhhdmUgYmVlbiBtaWdyYXRlZC4g{}Q2hlY2sgdGhlIE9SRFMgUkVTVGZ1bCBzZXJ2aWNlcyBjb25zb2xlLg,,/i0alrVuoGy8I9E_bLXguBWaTMQNatGX1u8ftXI4Nrgu8IfCf3E9j1dgjRL-pEizpdgUWNSOvCliQZs9MHeHMVQ

       

      If I take a normal letter out (B for instance) I get the 400 error. If I take out "{}" Tomcat allows it and APEX gives me a "Success message checksum error" so it seems to be the "{}" fault.

       

      Any way to get passed this?

       

      Best Regards

      Olafur

        • 1. Re: ORDS 18.2 + Tomcat 7/8 problem RFC 7230 and RFC 3986
          Olafur T

          I changed the {} to %7B%7D and got past. But this should probably be fixed in next version of ORDS. i.e. use utl_url.escape on the encoded message string. I have to do this regularly when doing changes. Regards Olafur

          • 2. Re: ORDS 18.2 + Tomcat 7/8 problem RFC 7230 and RFC 3986
            1525287

            Hi Olafur,

             

            I have the same problem with ORDS. It generated the errors:

            ...

            HTTP Status 400 - Bad Request

            Type Exception Report

            Message Invalid character found in the request target. The valid characters are defined in RFC 72300 and RFC 3986

            ...

             

            I have added an attribut relaxedQueryChars="{,}" in $CATALINA_HOME/conf/server.xml to the connector definition. My connector section looks like:

             

            <Connector

                               protocol="org.apache.coyote.http11.Http11NioProtocol"

                               port="9443" maxThreads="200"

                               scheme="https" secure="true" SSLEnabled="true"

                               keystoreFile="/app/tomcat/apache-tomcat-9.0.11/security/keystore" keystorePass="TestPassword"

                               relaxedQueryChars="{,}"

                               clientAuth="false" sslProtocol="TLS" />

             

            After apache tomcat restart I have no problem with ORDS anymore - the symbols "{" and "}" passed through now.

             

            Regards,

            Boris.

             

            1 person found this helpful
            • 3. Re: ORDS 18.2 + Tomcat 7/8 problem RFC 7230 and RFC 3986
              Olafur T

              Oh, nice. Thank you for that tip. Will try that out.