camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dtabwhite <david.wh...@mindreef.com>
Subject Re: Jetty component response code/status line
Date Fri, 07 Mar 2008 19:27:54 GMT

I'll take a crack at it...


James.Strachan wrote:
> 
> On 07/03/2008, David White <david.white@mindreef.com> wrote:
>> Hi,
>>
>>  I'm a Camel newbie, but from what I've seen so far it looks like a
>> fantastic
>>  framework and a great addition to the old toolbox!  I've been trying to
>>  create a simple flow between a Jetty consumer endpoint and a Http
>> producer
>>  endpoint to provide a rudimentary proxying capability.  I setup a simple
>>  flow like this:
>>
>>  from("jetty:http://...").to("http://...")
>>
>>  This works, but I've seen that the response code that comes back from
>> Jetty
>>  is always 200 even if what comes back from the Http producer is
>> something
>>  else (i.e. 500, 404, etc.).  In looking at the source it looks like
>>  HttpBinding.writeResponse could call setStatus and/or sendError to send
>> back
>>  non 200 Ok responses.  The status code (I think) could be checked with
>> the
>>  http.responseCode header if present.  Similarly, could the HttpProducer
>> also
>>  set StatusLine information (i.e. httpVersion, statusCode, reasonPhrase)
>>  headers so that the HttpBinding could set these in the response?
> 
> Definitely, thats a great idea. It'd also mean that the routing rules
> could customize the status codes too if you wanted to change what the
> http endpoint returns.
> 
> We love contributions:
> http://activemq.apache.org/camel/contributing.html
> 
> do you fancy taking a stab at a patch to fix this use case?
> 
> 
>>  Any insight on this would be great.  Also, thanks again for such a great
>>  framework!
> 
> You're most welcome! :)
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Jetty-component-response-code-status-line-tp15887687s22882p15903938.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message