camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] Updated: (CAMEL-807) HttpProducer premature out message creation
Date Tue, 12 Aug 2008 08:50:52 GMT


Claus Ibsen updated CAMEL-807:

    Fix Version/s: 1.5.0

> HttpProducer premature out message creation
> -------------------------------------------
>                 Key: CAMEL-807
>                 URL:
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-http
>    Affects Versions: 1.4.0
>            Reporter: Bill Skrypnyk
>             Fix For: 1.5.0
> I believe there is incorrect flow in the HttpProducer which can subvert error handling
in the route:
> in Camel 1.4.0 in HttpProducer on line 76 a "blank" out message is set on the exchange:
> Message out = exchange.getOut(true);
>         try {
>             int responseCode = httpClient.executeMethod(method);
> ...
> 1. If an IO error occurs on connect, the out message will be passed to the error handling
code and if the originating endpoint was a JmsMessage it will cause an NPE when JmsMessage.getMessageId()
is called. It also obscures the offending message I believe.
> 2. A similar situation will happen if the HTTP service returned an error code; the out
message will contain a reply message even though the processing resulted in an error (e.g.
HTTP Status 500) 
> 3. Also, shouldn't this code test whether the exchange expects an "out" altogether, and
if not, perhaps, put just put the return HTTP status into the "in" message header.
> --Bill

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message