You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Salvatore Lionetti <sa...@gmail.com> on 2012/07/11 20:41:45 UTC

[tomcat users] Lenght Encoding

Hi to all,

I'm using Tomcat 7.0.28, a simple doGet() synchronous customization of
HttpServlet, responding with a 'push' multipart.
This response is generated by tomcat server and my webapp: does in yours
opinion looks like correct?

HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1

... Connection: keep-alive
> Content-Type: multipart/x-mixed-replace;boundary=NEWD
> Transfer-Encoding: chunked (ADDED BY TOMCAT ENGINE)
>
>
> --NEWD
> 2...
> --NEWD
> 1...
> --NEWD
>
> --NEWD--
>

I mean: why tomcat engine add chunks encoding (see the header) if in this
case an indefinite length encoding is presents, marked with 'NEWD'?

Many thanks for attention.
Have a good day

Re: [tomcat users] Length Encoding

Posted by Salvatore Lionetti <sa...@gmail.com>.
Thanks for the quick response, i'm reading the rfc, although
multipart/x-mixed-replace is 'experimental' and then not mentioned in the
spec.

Anyway, for the opposite case (multipart request), i've found:

http://java.net/jira/browse/JERSEY-488

'sandoz' suggest as workaround to avoid chunck encoding at client side (and
tryied to resolve the issue at server side, maybe i'm wrong)
Why should multipart message has not to be symmetrical?


On Wed, Jul 11, 2012 at 9:34 PM, Mark Thomas <ma...@apache.org> wrote:

> On 11/07/2012 19:41, Salvatore Lionetti wrote:
> > Hi to all,
> >
> > I'm using Tomcat 7.0.28, a simple doGet() synchronous customization of
> > HttpServlet, responding with a 'push' multipart.
> > This response is generated by tomcat server and my webapp: does in yours
> > opinion looks like correct?
>
> Yes.
>
> > HTTP/1.1 200 OK
> >> Server: Apache-Coyote/1.1
> >
> > ... Connection: keep-alive
> >> Content-Type: multipart/x-mixed-replace;boundary=NEWD
> >> Transfer-Encoding: chunked (ADDED BY TOMCAT ENGINE)
> >>
> >>
> >> --NEWD
> >> 2...
> >> --NEWD
> >> 1...
> >> --NEWD
> >>
> >> --NEWD--
> >>
> >
> > I mean: why tomcat engine add chunks encoding (see the header) if in this
> > case an indefinite length encoding is presents, marked with 'NEWD'?
>
> Try reading RFC 2616.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: [tomcat users] Length Encoding

Posted by Mark Thomas <ma...@apache.org>.
On 11/07/2012 19:41, Salvatore Lionetti wrote:
> Hi to all,
> 
> I'm using Tomcat 7.0.28, a simple doGet() synchronous customization of
> HttpServlet, responding with a 'push' multipart.
> This response is generated by tomcat server and my webapp: does in yours
> opinion looks like correct?

Yes.

> HTTP/1.1 200 OK
>> Server: Apache-Coyote/1.1
> 
> ... Connection: keep-alive
>> Content-Type: multipart/x-mixed-replace;boundary=NEWD
>> Transfer-Encoding: chunked (ADDED BY TOMCAT ENGINE)
>>
>>
>> --NEWD
>> 2...
>> --NEWD
>> 1...
>> --NEWD
>>
>> --NEWD--
>>
> 
> I mean: why tomcat engine add chunks encoding (see the header) if in this
> case an indefinite length encoding is presents, marked with 'NEWD'?

Try reading RFC 2616.

Mark

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