Accept gzipped JSON requests
Posted: Mon Nov 21, 2022 5:52 pm
In the Xserver2 documentation you mention that "The PTV xServer will accept compressed requests and send compressed responses".
The response compression works succesfully if we set Accept-Encoding header with gzip value.
The problem is the other direction, if we send a gzipped json request to "/services/rs/XRoute/calculateRoute" with Content-Encoding: gzip we get the following error:
Could you help us to solve this issue? May we miss a config somewhere?
It would be a great improvement for us if this worked, becouse we very often send large requests with RequestProfile or binaryFTL.
Thanks,
Adam
The response compression works succesfully if we set Accept-Encoding header with gzip value.
The problem is the other direction, if we send a gzipped json request to "/services/rs/XRoute/calculateRoute" with Content-Encoding: gzip we get the following error:
Code: Select all
{
"message": "Illegal character ((CTRL-CHAR, code 31)): only regular white space (\\r, \\n, \\t) is allowed between tokens\n at [Source: (org.apache.cxf.transport.http.AbstractHTTPDestination$1); line: 1, column: 2]",
"errorLine": 1,
"errorColumn": 2,
"faultType": "com.ptvgroup.xserver.exceptions.InvalidRequestFault"
}
It would be a great improvement for us if this worked, becouse we very often send large requests with RequestProfile or binaryFTL.
Thanks,
Adam