On 20/02/15 23:51, icfantv wrote:
We just came across this issue in production where our PUT request became so
large that our OAuth headers were getting stripped.  The culprit was our
OAuthInterceptor applying the headers in the POST PROTOCOL phase - changing
to PRE PROTOCOL fixed the issue.

What I'd like to understand is:

Where is this size set?
What is the value?
Is it configurable?
Is this behavior documented somewhere?

I'm not sure why it was working, it is possible that with smaller payloads HttpUrlConnection does some internal caching where the headers are cached even while the request body is being written out. You might want to experiment with setting a chunking threshold in HttpClientPolicy but IMHO it would be better deal with the custom headers at the earlier stage before any write related activity starts.

FYI, this is a problem I was seeing when setting the headers from JAX-RS ClientRequestFilter was not effective, I had to move the CXF interceptor supporting these filters to the earlier stage too

Cheers, Sergey



Thanks,

--adam



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Request-size-trigger-for-chunked-encoding-and-PRE-vs-POST-phase-tp5754519.html
Sent from the cxf-user mailing list archive at Nabble.com.


Reply via email to