Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98A7610BE8 for ; Fri, 6 Dec 2013 01:06:57 +0000 (UTC) Received: (qmail 17774 invoked by uid 500); 6 Dec 2013 01:06:54 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 17732 invoked by uid 500); 6 Dec 2013 01:06:54 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 17723 invoked by uid 99); 6 Dec 2013 01:06:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 01:06:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cbmanica@gmail.com designates 209.85.220.181 as permitted sender) Received: from [209.85.220.181] (HELO mail-vc0-f181.google.com) (209.85.220.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Dec 2013 01:06:48 +0000 Received: by mail-vc0-f181.google.com with SMTP id ks9so26534vcb.12 for ; Thu, 05 Dec 2013 17:06:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=fqedJAD6p5yphkmNvCdAj4ZCH4p7iLSBdrtpFD7vYlU=; b=GW5vIOTnu7j+Rx97YvrKKjqcF5v/uNBITI8z4jJZ88kfFOa644VAehxSj3f3JNvYm+ I+zB58De1W/TluqqY/IL0m8aHHHNkeHNEl02Mkho4CWiDCV1SpgpsxfpK8Mt9BhJ9l/N WfMm30TIqjqMbvkTIpUPZQBpcbuClsid3ImjtRmvUEJUNJt1M4M6nUbFedLSb3d78Nrv hPPA1KQSgwrtZ8Mh+8KYpJ5Pd4PgsQfoPnSIP7nREUMv/B7KO6BJvTvTIYo0GtftHPrf T0FNN9SZjt2Her2igJTf9Gpl82YaR6GUQARx81blDa3WG89OtyVTdcWvjCTvYDjEKJgF ok1Q== MIME-Version: 1.0 X-Received: by 10.220.113.143 with SMTP id a15mr371369vcq.38.1386291987243; Thu, 05 Dec 2013 17:06:27 -0800 (PST) Received: by 10.58.40.116 with HTTP; Thu, 5 Dec 2013 17:06:27 -0800 (PST) In-Reply-To: <52A0CCCA.6020100@christopherschultz.net> References: <529F6D02.7020809@christopherschultz.net> <52A0CCCA.6020100@christopherschultz.net> Date: Thu, 5 Dec 2013 17:06:27 -0800 Message-ID: Subject: Re: Transfer-Encoding: chunked not working From: "C. Benson Manica" To: Tomcat Users List Content-Type: multipart/alternative; boundary=047d7b343118749a2e04ecd3418d X-Virus-Checked: Checked by ClamAV on apache.org --047d7b343118749a2e04ecd3418d Content-Type: text/plain; charset=ISO-8859-1 On Thu, Dec 5, 2013 at 10:58 AM, Christopher Schultz < chris@christopherschultz.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > C., > > On 12/5/13, 12:53 PM, C. Benson Manica wrote: > > The content I expect is in the neighborhood of 30K. What I get back > > is > > > > $ curl -i http://localhost:8080/ > > > > HTTP/1.1 200 OK^M Server: Apache-Coyote/1.1^M Set-Cookie: > > JSESSIONID=6ED488F581B8D3317261ADA2AD97CC20; Path=/; HttpOnly^M > > Content-Type: text/html;charset=UTF-8^M Transfer-Encoding: > > chunked^M Date: Thu, 05 Dec 2013 17:47:22 GMT^M ^M > > > > > > > http://www.w3.org/TR/html4/loose.dtd"> var s > > Unfortunately, curl appears to be "handling" the content for you. I > think you want to look at the raw bytes coming back. > > I can't remember if I installed it myself or what, but you might have > tcpdump on your machine already. Try this: > > $ sudo tcpdump -Xi lo0 src port 8080 > I got this back: (apologies if the fixed-width formatting doesn't come through) 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.... So it looks like Tomcat is, for some reason, only sending one chunk, which is truncated at an arbitrary point in the output. > > This will dump everything. You'll need to read a bit to see all the > headers. You might also want to read-up on chunked transfer-encoding. > Based on my rudimentary understanding, Tomcat should be sending multiple chunk-encoded chunks here, right? > > > I'm not using a tool to inspect traffic, because if it becomes > > that troublesome to debug a default install, I'm probably just > > going to use jetty. (full disclosure: I *am* now using jetty, with > > the same web application, and not running into any issues, so > > whatever's going on is in Tomcat world.) > > Can you perhaps reduce the problem to something you could share with > us? Maybe someone on the list would be willing to do all that work so > that Tomcat can get fixed, assuming there is a problem. > Possibly, but I'm not sure I'd succeed in reproducing the issue, given that another gentleman has already made the attempt. 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. > > > In answer to your meta-question, brew seemed to do a reasonable job > > with Tomcat, modulo this issue. I don't know that > > /usr/local/Cellar/tomcat/7.0.47/libexec makes 100% sense for > > $TOMCAT_HOME, but at least everything's in the same place. > > Good to know. > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.15 (Darwin) > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJSoMzHAAoJEBzwKT+lPKRYV+AQAL2IEEnamhh8TsEes0BChuPl > uIkhrHM5i8f3OKQ6Gx4QP2aYJcjPcWg+1aGf/O7TdJsYTiWn9lQVunBfivZxtDYg > ABBlu3oqiOPjv/gZWbDy6adwwpCnWG8JPV4eiLtI1K3jHiu/XDABPQH1asw0uYXV > 6NsY9cLfJsMe0WKa2IJoYDabrE0LXOo7v4jLdz3TLARQ50W8RWwqhxxJrme8hSe/ > elCI7u2bLF93WTtWEjS6XZYDA///N54IvR1wjBDwjWAw/z5Zy+/25/RS+w3QGVDe > tW51wxE0xI0Rqk44U+Kt3vi3iYp6+2CNmrT3ZnT9UzSVWmBRjM13E+tvdjiv7VLA > gj+vGvRgEEtJecA3Di4+NlDsocxj865m3jEZqXDOKU1avoWDLWiIew1Ihb9qXpjU > pFUZNFy+kgYnP8QBXnjW3DcJHhU43Jhb5UP1QazVDml1ZQlbX4KUwgiPOLiCr6mz > VI58FUb3HZKSfyqB4xzt60TDJ7IexWq9PkjcF6wh9wkZtTMO4jV3Est7JAXcuz2w > EmKp9l1/hmqKF487PHiQodIQuiK3Yis+W8cjGvubVV/vjsQ/rlFCSrt1uIbUfhoO > aZ8QsBVL7UlpS3X1yqAnKPPUb84VtLteRK/DVzI13Nvxs9+KepOc68qlMZCJaXQv > UNZgZmunwk6o6hiBHKe2 > =bQW3 > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > -- C. Benson Manica cbmanica@gmail.com --047d7b343118749a2e04ecd3418d--