Strange error in "web request" action

Hello,

We try to call a GET API method who has a response body a .pdf file with 'web request' action and I get this error:

Error: An error occurred while sending the request.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
Source: action "Iterate Web request", module "Main", table "Table"

This is web request configuration

The CURL call is fine and it is looking like this:
'curl -H "Content-Type:application/xml" -H "Accept:application/octet-stream" -H "Accept:application/xml" -H "Authorization:'&{header}&
'" -H "Content-Disposition: attachment; filename="new.pdf"" -X GET "http://api.exemple.com/'" -OJ'

I got around this error using the cURL call, but there is something that doesn't work well.

Best regards,
Radu.

The response sent by the remote API doesn't follow the standard HTTP specification, which demands a response header to be followed by CR+LF (line break), but in your case, it's only followed by CR. EasyMorph is strict on expecting correct HTTP responses, while curl is apparently less strict.

Try checking these two options in the Web Location connector: