Hi
I know what's you mean after checking out the patch that you provided.
Current camel http code just assume that there is a response, and create
a null message after exchange.getOut is called.
You change just make sure the exchange.getOut() will not be called if
the Timeout exception is thrown.
Now my concern is that the Http protocol is typical request-response
message. It could be strange , if we don't setup the out message for it.
Can I have a look at your route of handle error message ?
In Camel 2.x, you can setup the ErrorHandler to use the
UsingOriginalMessage option to make sure your failure processor can get
the original message.
Willem
On 3/18/11 2:29 AM, rosmons wrote:
@Willem:
We have found that this issue can be fixed by making a change to the
HttpProducer.java class.
The issue is that we're extracting the body after calling the
"exchange.getOut()".
This means that if there's an exception while extracting the body the
original message will not get sent to the errorhandler/onException. Instead
a message with empty headers and body is sent.
I moved the "extractResponseBody(method, exchange)" to a line above
"exchange.getOut()" and am able to get the desired result.
You can see the attached diff file to see the change that we have made.
http://camel.465427.n5.nabble.com/file/n3893573/HttpProducer.java.diff
HttpProducer.java.diff
--
View this message in context:
http://camel.465427.n5.nabble.com/Http-route-returning-with-200-but-also-getting-read-timed-out-tp3741631p3893573.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang