I just did some test on the issue, and found out it was caused by the
request message was not right.
As the Http Request was sending with application/x-www-form-urlencoded,
which means the message body should be some string like
"file.name=file.xml", but with the "curl -v -d file.xml
'http://localhost:4443/to2-service/sendMessage", the message body became
"file.xml", and DefaultHttpBinding throw the exception like that.
And it has nothing to do with the Null Http header.
I just did a quick fix for in Camel trunk, please check out latest Camel
2.8-SNAPSHOT to verify the fix.
On 3/29/11 3:32 AM, Knut Enners wrote:
Finally, I found the error - thanks for helping anyway ;)
It's a camel bug (2.4., 2.6) affecting the classes
org.apache.camel.component.http.DefaultHttpBinding
org.apache.camel.component.http4.DefaultHttpBinding
method readRequest needs to check null-values, as POST requests may not
set any headers.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang