Frontend application gets timeout when using expect:continue header
search cancel

Frontend application gets timeout when using expect:continue header

book

Article ID: 384157

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

Frontend application get timeout when using expect:100-continue header

POST /apigatewayservice/ HTTP/1.1
Content-Type: text/xml; charset=utf-8
Transfer-Encoding: chunked
SOAPAction: "GetMessages"
Expect: 100-continue
Host: 192.xxx.xxx.xxx:8080
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset: utf-8
User-Agent: xxxx

API Gateway sends back a tcp ack and http 1.1 100  

HTTP/1.1 100 

Frontend ack the package but does not send the remaining data 

API gateway waits 20 sec  and respond with a 400 as nothing is received 

 

Resolution

The frontend application recieved the  HTTP/1.1 100  from the gateway but expects a HTTP/1.1 100 Continue.

According the rfc the reason prase is optional and tomcat did remove this the application should act on the 100 response only . 

Because there where a lot off client having problem with this with LB expecting a 200 OK instead of o200 we included a option in gateway to add it again in GW 11

set the following option in the advanced tab for the listen port used .

To re-enable the reason phrase in response in Gateway 10.0 CR4 and later, you must add the advanced property sendReasonPhrase=true.

In Policy Manager, create a web service to validate the reason phrase.

When you execute the service using curl command, the HTTP response (HTTP/1.1 200) comprises only the status code '200' and No reason phrase.

Now, set sendReasonPhrase=true in the Listen Port Advanced Properties tab, and then run the curl command to execute the service.

The HTTP response (HTTP/1.1 200 OK) now includes the status code '200' as well as the reason phrase 'OK'.

This also works for the 100- continue after enabling this we send 

"HTTP/1.1 100 Continue"