3 Replies Latest reply on Mar 8, 2019 12:45 PM by Vanja Keglević

    ORDS 18.3 on Tomcat 8.5: always chunked response from RESTful services?

    RSa-Dev

      My setup is APEX 18.2 + ORDS 18.3.0.

      I tried to use APEX_WEB_SERVICE.make_rest_request on Oracle-provided sample of RESTful service, HR:

      Here is my request:

      GET http://127.0.0.1:8080/ords/{workspace}/hr/employees/7369 HTTP/1.1
      Content-Length: 2
      Connection: Close
      Host: 127.0.0.1:8080
      
      

      Response from ORDS in standalone mode is JSON string good for parsing by APEX_JSON.parse:

      HTTP/1.1 200 OK
      Connection: close
      Date: Thu, 07 Mar 2019 07:10:13 GMT
      Content-Type: application/json
      ETag: "R4HKU3GUa8tAcm3DixE9lWoauhYpGJRGPMhvQIWDihlVUvRMnumFegkZ18F8m/gaeFxoR4hfmF9UeGfiuTOa7A=="
      {"empno":7369,"ename":"SMITH","job":"CLERK","mgr":7902,"hiredate":"1980-12-16T21:00:00Z","sal":800,"comm":null,"deptno":20}
      
      

      Responce from ORDS deployed on Tomcat 8.5 always have "Transfer-Encoding: chunked", even for tiny size of response bodies:

      HTTP/1.1 200
      ETag: "R4HKU3GUa8tAcm3DixE9lWoauhYpGJRGPMhvQIWDihlVUvRMnumFegkZ18F8m/gaeFxoR4hfmF9UeGfiuTOa7A=="
      Content-Type: application/json
      Transfer-Encoding: chunked
      Date: Thu, 07 Mar 2019 06:31:44 GMT
      7b
      {"empno":7369,"ename":"SMITH","job":"CLERK","mgr":7902,"hiredate":"1980-12-16T21:00:00Z","sal":800,"comm":null,"deptno":20}
      0
      
      

      Tomcat works in default config - as installed. According Tomcat docs it should not use Chunked Encoding for small HTTP messages.

      Maybe this is an ORDS issue?