You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Gladwell, Ricardo" <ri...@demon.net> on 2000/06/15 15:52:16 UTC

Chunked HTTP Responses and CRLF

Dear All,

I have noticed a "problem" with Tomcat JSP generation on Unix systems. We
are currently attempting to generate dynamic WML via JSP which we then send
to a WAP Gateway for compilation into bytecode. While testing our JSP pages
via the Nokia SDK we noticed no problems. When we started testing via
Nokia's NAMP Gateway we noticed that the code was not compiling. Further
investigation revealed the following: the JSP pages converts some new-lines
into CRLF (or \r\n) carriage returns. The Gateway does not like this and I
am not convinced that this isn't standard HTTP 1.1: can you insert CRLF
returns into chunked text data?

-- 
Ricardo Gladwell, Web Developer
Demon Internet, Westhumble House,
Dorking Business Park, Dorking. RH4 1HJ
Tel: +44 (01306) 732 356
Mobile: +44 (07779) 841 444

[Catalina] Re: Chunked HTTP Responses and CRLF

Posted by Remy Maucherat <re...@apache.org>.
> Dear All,
>
> I have noticed a "problem" with Tomcat JSP generation on Unix systems. We
> are currently attempting to generate dynamic WML via JSP which we then
send
> to a WAP Gateway for compilation into bytecode. While testing our JSP
pages
> via the Nokia SDK we noticed no problems. When we started testing via
> Nokia's NAMP Gateway we noticed that the code was not compiling. Further
> investigation revealed the following: the JSP pages converts some
new-lines
> into CRLF (or \r\n) carriage returns. The Gateway does not like this and I
> am not convinced that this isn't standard HTTP 1.1: can you insert CRLF
> returns into chunked text data?

In RFC 2616, page 25, the chunk-data is defined as
chunk-size(OCTET)
So you should be able to put whatever you want in a chunk. The client should
use the chunk-size, instead of the CRLF to determine the end of the chunk.

I just tested generating a dynamic response with \r\n in it, and indeed it
works (clients used were IE 5.01 and Mozilla). I didn't test chunking with
any other clients, though, so I could have missed something.
Are your sure the compilation errors come from this ? Perhaps the gateway
does not support chunking very well (in which case a workaround is needed,
like for example adding a config file parameter in Catalina disabling
persistent connections).

BTW, Catalina HTTP/1.1 connector doesn't support chunking on input for now
(which does not seem to be widely used anyway).

Remy