Details
-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
fuse-7.x-GA
-
None
-
%
-
Description
There is likely a issue if you use http4 producer with basic or ntlm authentication. The message body may be read when sending to the http server, exhausting the stream. Then when the downstream server returns an authentication challenge to the client, the client then attempts to re-submit the request with credentials included. At this point, the message body must be re-sent but due to streaming the body is not re-readable and you can get a NonRepeatableRequestException:
Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity. at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:226) ~[?:?] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) ~[?:?] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[?:?] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) ~[?:?] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[?:?] ... 37 more
Enabling streamCache does not resolve the issue - only conversion of the payload to a non-stream type via processor or converter works around the problem.
Upstream Issue: https://issues.apache.org/jira/browse/CAMEL-13930