Azure APIM - ProtocolViolation: at forward-request

Nagashree Balasundaram 741 Reputation points
2022-10-07T22:15:39.127+00:00

We are observing intermittent ProtocolViolation: at forward-request error for a backend call from Azure APIM. The Appinsights shows error message as
The server committed a protocol violation. Section=ResponseStatusLine

Any pointers on what could be going wrong. I checked a few posts on stackoverflow - most of them pointed to CRLF issues/malformed headers and change webserver settings to useUnsafeHeaderParsing to true
Is there a way to resolve this in APIM?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,960 questions
0 comments No comments
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 24,111 Reputation points
    2022-10-10T16:57:14.817+00:00

    Hi @Nagashree Balasundaram Thanks for reaching out. No, there is no way to resolve it from APIM because this is not APIM's problem this happens due to your backend replies with broken payload. You need to take a look at your backend to understand under which conditions this would happen. If there is any firewall/gateway between APIM and backend that is a good place to start. Logging network traffic usually helps, although it would need to be decrypted.

    let me know incase of further queries, I would be glad to assist you.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful