tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Transfer-Encoding: chunked not working
Date Fri, 06 Dec 2013 22:06:04 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

C.,

On 12/5/13, 8:06 PM, C. Benson Manica wrote:
>> I got this back: (apologies if the fixed-width formatting doesn't
>> come through)

It came through just fine.

>> 16:34:44.954734 IP6 localhost.http-alt > localhost.61592: Flags
>> [P.], seq 1:9001, ack 146, win 9166, options [nop,nop,TS val
>> 266717589 ecr 266717588], length 9000 0x0000:  600e be82 2348
>> 0640 0000 0000 0000 0000  `...#H.@........ 0x0010:  0000 0000
>> 0000 0001 0000 0000 0000 0000  ................ 0x0020:  0000
>> 0000 0000 0001 1f90 f098 239d 52e7  ............#.R. 0x0030:
>> 95db ddf9 8018 23ce 2350 0000 0101 080a  ......#.#P...... 0x0040:
>> 0fe5 c995 0fe5 c994 4854 5450 2f31 2e31  ........HTTP/1.1 0x0050:
>> 2032 3030 204f 4b0d 0a53 6572 7665 723a  .200.OK..Server: 0x0060:
>> 2041 7061 6368 652d 436f 796f 7465 2f31  .Apache-Coyote/1 0x0070:
>> 2e31 0d0a 5365 742d 436f 6f6b 6965 3a20  .1..Set-Cookie:. 0x0080:
>> 4a53 4553 5349 4f4e 4944 3d38 4533 4637  JSESSIONID=8E3F7 0x0090:
>> 4631 4131 4542 4537 3733 3341 3943 3146  F1A1EBE7733A9C1F 0x00a0:
>> 3846 4142 4436 3630 3333 453b 2050 6174  8FABD66033E;.Pat 0x00b0:
>> 683d 2f3b 2048 7474 704f 6e6c 790d 0a43  h=/;.HttpOnly..C 0x00c0:
>> 6f6e 7465 6e74 2d54 7970 653a 2074 6578  ontent-Type:.tex 0x00d0:
>> 742f 6874 6d6c 3b63 6861 7273 6574 3d55  t/html;charset=U 0x00e0:
>> 5446 2d38 0d0a 5472 616e 7366 6572 2d45  TF-8..Transfer-E 0x00f0:
>> 6e63 6f64 696e 673a 2063 6875 6e6b 6564  ncoding:.chunked 0x0100:
>> 0d0a 4461 7465 3a20 4672 692c 2030 3620  ..Date:.Fri,.06.
> 
>> ... much redaction ...
> 
>> 0x1df0:  426f 6f6c 6561 6e28 7363 7269 7074 2e64
>> Boolean(script.d 0x1e00:  6f6e 6529 3b0a 2020 2020 7661 7220 730d
>> one);.....var.s. 0x1e10:  0a30 0d0a 0d0a
>> .0....

Unfortunately, you redacted all of the exciting parts. The last thing
you showed before the break was still the initial headers. Can you
show me at least the end of the initial headers and preferably the
beginning of the first chunk?

>> So it looks like Tomcat is, for some reason, only sending one
>> chunk, which is truncated at an arbitrary point in the output.

One TCP/IP packet doesn't necessarily mean only a single chunk. I
can't see the first chunk-length from your tcpdump output, so it'w
tough to tell.

>> Based on my rudimentary understanding, Tomcat should be sending
>> multiple chunk-encoded chunks here, right?

That depends on the flushing behavior of the webapp and a few other
things. If there is no flush() occurring, I would expect Tomcat to
send roughly equally-sized chunks which match whatever its buffer size
is until there is no more content to return.

>> I'm hypothesizing at this point that there might be some obscure
>> interaction between the default Tomcat installation and the
>> settings and environment that my IDE is using to launch Tomcat
>> and the web application. If I get a chance, I'll try to put
>> together a simple web app and post it here if I can reproduce
>> the problem. Thanks for the assistance - in the meantime,
>> however, given that I've gotten this to work with Jetty, I need
>> to get back to wrangling with the app itself.

I understand. :(

Good luck,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSokpJAAoJEBzwKT+lPKRYw64P/3cdg516TjaA1DpJ2JlNQCob
U8EV3e5nnS0R5yskLVv+faigzzVGxSA7qOzc9dY0bGQ/yXWEhVcyJklwpzfycL7v
QMRplsluNBnxB9bBbEzR55qWqNXZl2W7sQ4PeVuK+MMrWwLvPQ+jshyoxZEtUtS8
fxSqtIgATvGIZH0SyqG9s0H87xxFyuAnbdhl9K3w2pkeba+3ie8Nl0321NQQalS2
SOV5sHnpee8ndhpLruwN7jC9mAP0e8Q8h8Q/PsoiwENHnwgO1TUCCI6XyL28bBh1
aUfN2mwKDAB82JMm1DVU/uwJVT+YeJmXI/m81HxpRf6WpstrQrSQHJIU46DLfOmK
FxzIzpcoy4efeBbexawBuMnItYwMpXAk0FhqR9yld4od+ZJzpDYo87jhZ/qni9tj
p6pMyXE4EguPoAMLH2UGf93g/38vK1e8PO4+J1t83AF7Q8GKVHxQ/hqeLyUYp5Lf
NbfcckqeH4pi+uPNqK2IYgoGxsNivBl8lsUQIyvYK4bO+rt2ePVtfCwVy9jXhC0m
+Y4z6PpPSTS+CjF/lTFDvbHKo1hOvZI/pQ1GpVjfbygXWhKZ03n5IUEFLokni9ME
dCCwuH+2WIv3boz6sq5YXP71Sk/GjoMx9I9F0j3t/esb344/qWKXCjos+yYSEP9r
/299qjhDn4m5XryAuBOO
=PdZ/
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message