content-length when using http compression -



content-length when using http compression -

the client making range request 0-1023 http server. prefers gzip compression accept-encoding: gzip;q=1.0, identity; q=0.5, *;q=0 in request.

what content-length in response header? 1024 or size of compressed data.

thanks,

it's smaller of 1024 or compressed size.

rfc2616 section 14 says:

" [ rest of reply has no relevance actual question asked. i'm leaving in because people found useful. ]

rfc 2616 has (amongst other things) content-length:

applications should utilize field indicate transfer-length of message-body, unless prohibited rules in section 4.4.

so have figure out transfer-length is; section 4.4 (message length) says these 2 things transfer-length:

the transfer-length of message length of message-body appears in message; is, after transfer-codings have been applied.

if content-length header field (section 14.13) present, decimal value in octets represents both entity-length , transfer-length. content-length header field must not sent if these 2 lengths different

okay, know in case transfer-length, entity-length, , content-length have same value, , refer "the length of message-body appears in message", , have determine message-body is. section 4.3 says message-body:

the message-body (if any) of http message used carry entity-body associated request or response."

so what's entity-body? have refer of section 7. (which defines entity-length.) importantly, there this:

entity-body := content-encoding( content-type( info ) )

the length of entity-body (and hence our value content-length per 4.4) length of info after content-coding.

http

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -