Hi Debasis,
This is indeed puzzling. You note the backend urls are identical for both v5 and v10. v5 never used chunked uploads which is why disabling them in v10 if there are problems is usually the first thing to try for errors like this. The encode-plus-chars controls the plus character being sent to the backend. The plus is one mechanism in the url of representing a space, but if you really wanted the backend to see a plus, then the plus with that option enabled will be sent as an encoded %2B which the backend should decode back to a plus.
Are you saying that your v10 API does work when there is NOT a space in the query parameter value? If so I would suggest you open a PMR case on the issue as triaging it here in the forum isn't the right place. You should provide a copy of your v5 and v10 API yaml file and DataPower debug logs showing the flow of the transaction. If you have a physical / virtual DataPower appliance in v10, providing a packet capture in the PMR data of traffic to your backend (filtered by the host IP of the backend server), both from your v5 and v10 environments for this same transaction would be very useful for comparison purposes. If you can get the DataPower packet capture, please enable the TLS session keys option as well so your https traffic can be decrypted and the raw request data can be seen that is flowing in both cases. If a v10 Kubernetes DataPower pod, packet captures are not done from DataPower but from the host machine which I've never done before. L2 support will be able to assist you in getting these packet captures in the Kubernetes case.
Best Regards,
Steve Linn
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------
Original Message:
Sent: Tue July 09, 2024 10:12 AM
From: Debasis Samal
Subject: 400 Bad request when query parameter in request contains space
Hi Steve,
I made it chunked-uploads: false which was true earlier , but same error .
I made encode-plus-char: true too but error still persists
Thanks,
Debasis Samal
Original Message:
Sent: 7/9/2024 8:09:00 AM
From: Steve Linn
Subject: RE: 400 Bad request when query parameter in request contains space
Hi Debasis,
On your API's invoke policy, do you have either chunked-uploads enabled or is the property missing which the Gateway would default to enabled? If so ensure the property is set to false and see if that makes a difference. Some backends don't support chunked uploads and can't properly parse out the request to get a valid request payload.
Regards,
Steve Linn
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
Original Message:
Sent: Mon July 08, 2024 12:21 PM
From: Debasis Samal
Subject: 400 Bad request when query parameter in request contains space
Hi ,
After V10 migration when consumer tested , noticed that when there is space in addresses?query=NC1Y 8CD , in case of v10 received 400 Bad request where as in V5 is working as expected with 200 OK.
Flow is like APIC ----------- > Microservice------- > Backend.
In case of V10 , microservice is throwing
HTTP response code 400 for
https:/Microservice Endpoint/addresses/?query=NC1Y%208CD
where as in V5
200 OK
'https:/Microsercvice Endpoint/addresses/?query=NC1Y%208CD
Can anybody help us why in case of V10 Microservice is throwing 400 though don't see any change in Microservice end.
------------------------------
Debasis Samal
------------------------------