Skip to main content

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

That is a 100% valid HTTP/1.1 response, all properly implemented HTTP/1.1 clients support it.
Valid since HTTP/1.1 spec https://tools.ietf.org/html/rfc2068 (published in 1997)

Also, you should upgrade, as Jetty 8.x is long ago EOL / End of Life (as of Nov 2014)
https://www.eclipse.org/jetty/documentation/current/what-jetty-version.html

Jetty 8.1.12 is also subject to several security issues now.
https://www.eclipse.org/jetty/security-reports.html

Joakim Erdfelt / joakim@xxxxxxxxxxx

On Tue, Sep 29, 2020 at 10:36 AM Gurudatta Pai <gurudatta.pai07@xxxxxxxxx> wrote:
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.
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users

Back to the top