Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] No Content-Length header causing problems

Hi All,

We are using Jetty and the response has following header when sentĀ -H 'Accept-Encoding: gzip' header with the request. This is working fine.

< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Access-Control-Allow-Origin: *
< Content-Encoding: gzip
< Vary: Accept-Encoding, User-Agent
< Content-Length: 259
< Server: Jetty(8.1.12.v20130726)

But when we send Connection: close header then the content-length header is missing from the response which is causing problems.

Request hasĀ -H 'Accept-Encoding: gzip' -H 'Connection: close' headers. Following is the response headers.

< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Access-Control-Allow-Origin: *
< Content-Encoding: gzip
< Vary: Accept-Encoding, User-Agent
< Connection: close
< Server: Jetty(8.1.12.v20130726)

Is there any workaround for this? Also I tried debugging for this but could not get the exact code where we add the content-length and where we skip it. Can anyone please provide more details on this.

Thanks.

Back to the top