On 07/03/2008, David White <[EMAIL PROTECTED]> 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