[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jersey-dev] [External] : Question about GZIP encoding and Content-Length
|
Hi, no, I'm sending requests to different URLs but all else is the same
- sending a Cookie (they require authentication) and "Accept-Encoding:
gzip". All of them have the same annotations -
@Consumes(MediaType.APPLICATION_JSON),
@Produces(MediaType.APPLICATION_JSON), @Compress (my custom
implementation which just does what the built-in code does). Some of
them are sync, some async. I can't see anything that differentiates the
ones that send back `content-length` from the others that don't. But
it's consistent - they always either return or don't.
On 9/14/23 15:13, Martynas Jusevičius wrote:
For example, Content-Length should not be set when Transfer-Encoding:
chunked is used. Could it be the case?
https://stackoverflow.com/questions/3304126/chunked-encoding-and-content-length-header
On Thu, Sep 14, 2023 at 1:55 PM Boris Petrov via jersey-dev
<jersey-dev@xxxxxxxxxxx> wrote:
OK, false alarm, I was wrongly checking the length of the response. But question 1 still remains - why are some responses with a content-length and some are not?
On 9/12/23 15:29, Jan Supol wrote:
Hi,
can share your tests?
Thanks
Jan
________________________________
From: jersey-dev <jersey-dev-bounces@xxxxxxxxxxx> on behalf of Boris Petrov via jersey-dev <jersey-dev@xxxxxxxxxxx>
Sent: Sunday, September 10, 2023 11:00 AM
To: jersey-dev@xxxxxxxxxxx <jersey-dev@xxxxxxxxxxx>
Cc: Boris Petrov <boris_petrov@xxxxxxxx>
Subject: [External] : [jersey-dev] Question about GZIP encoding and Content-Length
Hi all,
I'm not sure how Jersey handles the Content-Length header when a
response is GZIP-compressed (via GZipEncoder for example). I see in my
tests that a Content-Length header is (sometimes) sent but it is
different from the actual body length. I believe that's not OK as the
two numbers should match. So can someone explain to me two things:
1) why is Content-Length sometimes sent and sometimes not? What does it
depend on?
2) why is Content-Length different from the actual body length when GZIP
encoding is used.
Thanks in advance,
Boris
_______________________________________________
jersey-dev mailing list
jersey-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://urldefense.com/v3/__https://www.eclipse.org/mailman/listinfo/jersey-dev__;!!ACWV5N9M2RV99hQ!Park9_bFFajvLru7q3GPCP_GDwZ2SOGdpwek4HgdLMW9n-82y73QLaj1s8jnX28aBBKinZwZ-VqH0kLIKo85FA$
_______________________________________________
jersey-dev mailing list
jersey-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jersey-dev