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


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd";>
<!-- intervening content elided -->
    var s

i.e., it just ends 16384 bytes into the full content of the page. This
behavior also happens when I load the page in Chrome, so it's not just some
oddity of curl.

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.)

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.

On Wed, Dec 4, 2013 at 9:57 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Benson,
>
> On 12/3/13, 6:55 PM, C. Benson Manica wrote:
> > Tomcat 7.0.47, OSX 10.8. Fresh install via homebrew.
>
> [As an aside, I'm interested in your experience with
> Tomcat-via-homebrew. I use Mac OS but installed Tomcat via
> direct-download. Does brew make a giant mess of everything, or is it
> pretty good?]
>
> > I'm running a web app with Tomcat that is returning the header
> > "Transfer-Encoding: chunked" and seemingly exactly one 16384-byte
> > chunk of content that is longer than that.
>
> What do you mean by the above statement? Is the content 16384 bytes
> long or isn't it? A chunked response should include a "main" response
> which just says "chunked" and then a series of actual chunks with
> content-length headers in each one.
>
> What is the content-length header in the first chunk? How many bytes
> do you actually get in that chunk? Did you get a zero-byte final
> chunk? How did you count those bytes? How many total bytes were you
> expecting?
>
> What tool are you using to inspect the traffic?
>
> > Consequently the page that should be transferred is not rendered by
> > the user agent (Chrome in this case). AFAICT it's Tomcat that isn't
> > sending all the chunks properly. Why might it not be doing that?
> > What else might be the problem?
>
> Unless your web application is doing odd things, Tomcat is responsible
> for chunking your response. If you are using a fronting web server,
> that could complicate matters, too, but it does not sound like you are
> doing that.
>
> Can you give some more information? (See above)
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.15 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIcBAEBCAAGBQJSn20BAAoJEBzwKT+lPKRY2J0QAJYX2l1LYLhHdHSR9RWgSMwK
> WOjyNsRDV4OYUL8vSPFwWH4kktgWm4i5YkLwJUqTxkjD/XjrmGHzbaI879zgZ6Qp
> W05LBZuRhQ6YERjSiZFMb0ZN3+kzqOdLJjQ1d8dSLPSP3/leWLMYF2IP8KsIpf87
> pcdwjfshujzOy1Rjpod9fYehdgIoD0vLQyH/5vIEI9kS2Peqa7mx05axOYmoaTjP
> a/y8nWdbOPfQDkHKwN+F75CHXQIbtr/jVTh9fuVdnv2EMKvySHV4vFnrh9mvTKDD
> 6FX8+ktOl/MidJ0bU1Wzo4m9rFtDBylFsWnrHEDD3MYCGoypMtIvlOGoi2NGjb4t
> CuMEWZSHdz83wFEBnEQqrfyYCcwfUMFg247+72T/6irg7PQJwFWxOUZI6lQ5XYbF
> V6wl8Lm9MzXPAL4231PO3zOxQYE2slE5XeL03zi6QuxmxW8UUaAVYP1n05vYO7AS
> LUKBYqH7Z6odH6mkDIemAOq/AOjOZLhB6XRaoRvrZKHDRpm/LwfYtt3s0TC9lD7u
> bse0THd4amYvHjBaiV34yMx+htSM7Pqk3oqwZDouvLQo/4p0lsktQLRNgFF00oBI
> ++uhC6YQNqkua9E1s1KSsCpdFrHxhb819Sj6GCyru0iNplw5awtXDcIZ83OG4UJu
> SmNsFn4XKMtyS0YK1fCj
> =Fx81
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


-- 
C. Benson Manica
cbman...@gmail.com

Reply via email to