0
votes

I have a very simple flow as below:

 QUEUE ---> DATAMAPPER----> Consume Service(HTTP) ---> Logger( #[payload], #[message.inboundPropeties.['http.status']].

The queue will have multiple messages. Once I started the mule server, the first few messages get a successful response( status code 200).

After all, I'm getting the below error with 'statusCode' '400'. Does anyone have an idea on how to resolve the issue

    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
        <html><head>
      <title>400 Bad Request</title>
        </head><body>
        <h1>Bad Request</h1>
       <p>Your browser sent a request that this server could not understand.<br />
       Size of a request header field exceeds server limit.<br />
       <pre>
         X-MULE_SESSION
       </pre>
        </p>
        </body></html>

I have referred to this url: Bad Request, Your browser sent a request that this server could not understand. I believe that some cookies has to be removed. I'm not sure on how can I do from Mule end.

Any help will be appreciated. Thanks in advance.

2

2 Answers

3
votes

It looks like your session is just too big to be sent as an http header. If you really require to propagate your session you need to make it smaller (of if you have something very by compress it with gzip?). Or set the following connector configuration:

<http:connector name="sessionlessConnector">
    <service-overrides sessionHandler="org.mule.session.NullSessionHandler"/>
</http:connector>

Or remove the properties disabling internal transformers as described here:

http://forum.mulesoft.org/mulesoft/topics/how_to_remove_the_mule_session_header_from_a_http_request

0
votes

I have referred this url. It works fine. http://forum.mulesoft.org/mulesoft/topics/how_to_remove_the_mule_session_header_from_a_http_request

 <http:connector name="NoSessionConnector">
   <service-overrides
 sessionHandler="org.mule.session.NullSessionHandler"/>
 </http:connector>

Need to refer above connector in HTTP otbound

       <http:outbound-endpoint exchange-pattern="request-response" method="POST"   keepAlive="true" doc:name="HTTP" address="..." connector-ref="NoSessionConnector">
        <set-property propertyName="Content-Type" value="application/xml"/>
    </http:outbound-endpoint>

Thanks @Victor helps me to remove the issue.