« Return to Thread: HTTP Proxy

Re: HTTP Proxy

by Anatoli Kuzmin-2 :: Rate this Message:

Reply to Author | View in Thread

Reason of the problem "Only one cookie":
HttpClient sends cookies in multiply headers "Cookie"
Mule stores them in Map as a result lost prev headers. The same problem for Set-Cookie

Solution http client (only for sender)
set http.protocol.single-cookie-header to true
http://hc.apache.org/httpclient-3.x/preference-api.html


On Tue, Jun 30, 2009 at 3:28 PM, Anatoli Kuzmin <anatoli.kuzmin@...> wrote:
Hi

I tried to use mule as simple http proxy
but I have the several problems
1. request cookies did not send to server 
2. server set cookies, but mule response contains only cookie
3. server returned content type text/xml, mule response - text/plain

I attached configuration and test case.
Could you please help me?

the main part of configuration

    <http:connector name="httpConnector" enableCookies="true"/>
    <http:endpoint name="clientEndpoint" address="http://localhost:4019" synchronous="true"/>
    <http:endpoint name="serverEndpoint" address="http://localhost:4020" synchronous="true"/>

    <model name="main">

        <service name="HttpProxyService">
            <inbound>
                <inbound-endpoint ref="clientEndpoint"/>
            </inbound>
            <outbound>
                <pass-through-router>
                    <outbound-endpoint ref="serverEndpoint">
                    </outbound-endpoint>
                </pass-through-router>
            </outbound>
        </service>

    </model>



--
Best regards,
Anatoli Kuzmin



--
Best regards,
Anatoli Kuzmin

 « Return to Thread: HTTP Proxy