You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by EOIN MCQUILLAN <eo...@btinternet.com> on 2011/01/05 15:06:16 UTC
Tomcat and HTTP chunk extensions
Hi,
I'm looking at extending a web application we have so as HTTP POSTs sent to
it will contain information in the form of chunk extensions. In addition on
reply to these POST requests I would like to write a chunk extension back to the
caller.
Is there anything in the API which would allow me to a) extract the
extension from the request b) add detail in the form of a chunk extension to the
reply?
I have been looking at online documentation and all I can find at present is
that Tomcat looks like it supports reading chunk extensions but I can see
nothing about being able to write chunk extensions or access the detail from a
chunk extension.
I am using version 6.0.29. If anyone has any ideas or links on this topic it
would be greatly appreciated.
Thanks
Eoin
Re: Tomcat and HTTP chunk extensions
Posted by André Warnier <aw...@ice-sa.com>.
EOIN MCQUILLAN wrote:
> Mark I'm not sure I fully agree with your last answers. The purpose, to me,
> would be to extend the capabilities of chunked transfer encoding rather than to
> implement chunked transfer encoding. They are optional after all. Being optional
> then I would view them moe as a feature or extension but this is merely wording
> so I am splitting hairs here.
>
You may have missed an important part of an earlier answer by Mark : chunked encoding is a
transfer encoding.
It means that if you have
client <----> gateway <----> tomcat
then it is very possible that between tomcat and the gateway there would be chunked
encoding, but between the gateway and the client there would not. Or vice-versa. Or the
chunks may have different sizes. The gateway can decide, because it does not affect the
*content* of the message. So if you rely on the fact that the tomcat application would add
something to the chunk header, and the client would automatically see it, you may have a
problem.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by Mark Thomas <ma...@apache.org>.
On 05/01/2011 17:02, EOIN MCQUILLAN wrote:
> Mark I'm not sure I fully agree with your last answers. The purpose, to me,
> would be to extend the capabilities of chunked transfer encoding rather than to
> implement chunked transfer encoding. They are optional after all. Being optional
> then I would view them moe as a feature or extension but this is merely wording
> so I am splitting hairs here.
>
> I appreciate the time you've taken to reply on this.
Coming back to this, you can use the restrictedUserAgents attribute on
the connector to selectively disable keep-alive and chunking.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by EOIN MCQUILLAN <eo...@btinternet.com>.
Mark I'm not sure I fully agree with your last answers. The purpose, to me,
would be to extend the capabilities of chunked transfer encoding rather than to
implement chunked transfer encoding. They are optional after all. Being optional
then I would view them moe as a feature or extension but this is merely wording
so I am splitting hairs here.
I appreciate the time you've taken to reply on this.
Thanks
Eoin
________________________________
From: Mark Thomas <ma...@apache.org>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Wednesday, 5 January, 2011 16:39:31
Subject: Re: Tomcat and HTTP chunk extensions
On 05/01/2011 15:21, EOIN MCQUILLAN wrote:
> Mark - would you be able to explain to me then what your understanding is of
>the
>
> intended use of chunk extensions within HTTP?
To implement chunked transfer encoding.
> I understand what you are saying and I understand I may be pushing boundaries
> with what I am doing here and may write some of my own stuff for this purpose
> however the extensions look like a useful feature anyway so I'd be interested
>in
>
> knowing your opinion on them.
Chunked extentions are not a feature. They are a component part of
chunked transfer encoding.
Mark
>
>
>
>
> ________________________________
> From: Mark Thomas <ma...@apache.org>
> To: Tomcat Users List <us...@tomcat.apache.org>
> Sent: Wednesday, 5 January, 2011 14:58:55
> Subject: Re: Tomcat and HTTP chunk extensions
>
> On 05/01/2011 14:52, EOIN MCQUILLAN wrote:
>> Mark - maybe I am pushing the boundaries with what I am doing here however
>> given
>>
>> the HTTP RFC provides us with a chunk extension capability then I would have
>> assumed there would exist an set of API calls within Tomcat that allow us to
>> read/write a chunk extension?
>
> Your assumption is wrong. There is no such API.
>
> The HTTP protocol does not allow for client/server during a
> request/response. The client sends a request message, the server replies
> with a response message. That is all you have to work with.
>
> To repeat what I wrote before. Chunking is a transfer encoding. It
> applies *per link*, not end to end.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by Mark Thomas <ma...@apache.org>.
On 05/01/2011 15:21, EOIN MCQUILLAN wrote:
> Mark - would you be able to explain to me then what your understanding is of the
> intended use of chunk extensions within HTTP?
To implement chunked transfer encoding.
> I understand what you are saying and I understand I may be pushing boundaries
> with what I am doing here and may write some of my own stuff for this purpose
> however the extensions look like a useful feature anyway so I'd be interested in
> knowing your opinion on them.
Chunked extentions are not a feature. They are a component part of
chunked transfer encoding.
Mark
>
>
>
>
> ________________________________
> From: Mark Thomas <ma...@apache.org>
> To: Tomcat Users List <us...@tomcat.apache.org>
> Sent: Wednesday, 5 January, 2011 14:58:55
> Subject: Re: Tomcat and HTTP chunk extensions
>
> On 05/01/2011 14:52, EOIN MCQUILLAN wrote:
>> Mark - maybe I am pushing the boundaries with what I am doing here however
>> given
>>
>> the HTTP RFC provides us with a chunk extension capability then I would have
>> assumed there would exist an set of API calls within Tomcat that allow us to
>> read/write a chunk extension?
>
> Your assumption is wrong. There is no such API.
>
> The HTTP protocol does not allow for client/server during a
> request/response. The client sends a request message, the server replies
> with a response message. That is all you have to work with.
>
> To repeat what I wrote before. Chunking is a transfer encoding. It
> applies *per link*, not end to end.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by EOIN MCQUILLAN <eo...@btinternet.com>.
Mark - would you be able to explain to me then what your understanding is of the
intended use of chunk extensions within HTTP?
I understand what you are saying and I understand I may be pushing boundaries
with what I am doing here and may write some of my own stuff for this purpose
however the extensions look like a useful feature anyway so I'd be interested in
knowing your opinion on them.
________________________________
From: Mark Thomas <ma...@apache.org>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Wednesday, 5 January, 2011 14:58:55
Subject: Re: Tomcat and HTTP chunk extensions
On 05/01/2011 14:52, EOIN MCQUILLAN wrote:
> Mark - maybe I am pushing the boundaries with what I am doing here however
>given
>
> the HTTP RFC provides us with a chunk extension capability then I would have
> assumed there would exist an set of API calls within Tomcat that allow us to
> read/write a chunk extension?
Your assumption is wrong. There is no such API.
The HTTP protocol does not allow for client/server during a
request/response. The client sends a request message, the server replies
with a response message. That is all you have to work with.
To repeat what I wrote before. Chunking is a transfer encoding. It
applies *per link*, not end to end.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by Mark Thomas <ma...@apache.org>.
On 05/01/2011 14:52, EOIN MCQUILLAN wrote:
> Mark - maybe I am pushing the boundaries with what I am doing here however given
> the HTTP RFC provides us with a chunk extension capability then I would have
> assumed there would exist an set of API calls within Tomcat that allow us to
> read/write a chunk extension?
Your assumption is wrong. There is no such API.
The HTTP protocol does not allow for client/server during a
request/response. The client sends a request message, the server replies
with a response message. That is all you have to work with.
To repeat what I wrote before. Chunking is a transfer encoding. It
applies *per link*, not end to end.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by EOIN MCQUILLAN <eo...@btinternet.com>.
Mark - maybe I am pushing the boundaries with what I am doing here however given
the HTTP RFC provides us with a chunk extension capability then I would have
assumed there would exist an set of API calls within Tomcat that allow us to
read/write a chunk extension?
________________________________
From: Mark Thomas <ma...@apache.org>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Wednesday, 5 January, 2011 14:32:56
Subject: Re: Tomcat and HTTP chunk extensions
On 05/01/2011 14:29, EOIN MCQUILLAN wrote:
> Thanks for the reply André.
>
> I am taking my terminology from RFC 2616 so "chunk-extension" should be the
> right terminology I think.
>
> I don't think multiparting would be the way to go in this case. Really with the
>
> chunking extensions the idea for me would be to mid-request be able to
> communicate between client and server.
That is simply not possible in a single HTTP request/response. In
addition, chunking is a transfer encoding and therefore only applies per
link.
Sounds like you really need to be using Comet.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by Mark Thomas <ma...@apache.org>.
On 05/01/2011 14:29, EOIN MCQUILLAN wrote:
> Thanks for the reply André.
>
> I am taking my terminology from RFC 2616 so "chunk-extension" should be the
> right terminology I think.
>
> I don't think multiparting would be the way to go in this case. Really with the
> chunking extensions the idea for me would be to mid-request be able to
> communicate between client and server.
That is simply not possible in a single HTTP request/response. In
addition, chunking is a transfer encoding and therefore only applies per
link.
Sounds like you really need to be using Comet.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by EOIN MCQUILLAN <eo...@btinternet.com>.
Thanks for the reply André.
I am taking my terminology from RFC 2616 so "chunk-extension" should be the
right terminology I think.
I don't think multiparting would be the way to go in this case. Really with the
chunking extensions the idea for me would be to mid-request be able to
communicate between client and server. The request will be fairly long lived and
involves a lot of data being transferred.
Chunked-Body = *chunk
last-chunk
trailer
CRLF
chunk = chunk-size [ chunk-extension ] CRLF
chunk-data CRLF
chunk-size = 1*HEX
last-chunk = 1*("0") [ chunk-extension ] CRLF
chunk-extension= *( ";" chunk-ext-name [ "=" chunk-ext-val ] )
chunk-ext-name = token
chunk-ext-val = token | quoted-string
chunk-data = chunk-size(OCTET)
trailer = *(entity-header CRLF)
________________________________
From: André Warnier <aw...@ice-sa.com>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Wednesday, 5 January, 2011 14:16:08
Subject: Re: Tomcat and HTTP chunk extensions
EOIN MCQUILLAN wrote:
> Hi,
> I'm looking at extending a web application we have so as HTTP POSTs sent
>to it will contain information in the form of chunk extensions. In addition on
>reply to these POST requests I would like to write a chunk extension back to the
>caller.
> Is there anything in the API which would allow me to a) extract the
>extension from the request b) add detail in the form of a chunk extension to the
>reply?
> I have been looking at online documentation and all I can find at present
>is that Tomcat looks like it supports reading chunk extensions but I can see
>nothing about being able to write chunk extensions or access the detail from a
>chunk extension.
> I am using version 6.0.29. If anyone has any ideas or links on this topic it
>would be greatly appreciated.
>
Hi.
I have never heard of the term "chunk extension" before in a HTTP context.
Are you sure that this is the right term for what you are trying to find, or
achieve ?
Maybe that is why you are not finding any information ?
Maybe you talking about a POST in "multipart/form-data" format ?
(and a response in a similar multi-part kind of format, although that would
cause problems with most browsers)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat and HTTP chunk extensions
Posted by André Warnier <aw...@ice-sa.com>.
EOIN MCQUILLAN wrote:
> Hi,
> I'm looking at extending a web application we have so as HTTP POSTs sent to
> it will contain information in the form of chunk extensions. In addition on
> reply to these POST requests I would like to write a chunk extension back to the
> caller.
> Is there anything in the API which would allow me to a) extract the
> extension from the request b) add detail in the form of a chunk extension to the
> reply?
> I have been looking at online documentation and all I can find at present is
> that Tomcat looks like it supports reading chunk extensions but I can see
> nothing about being able to write chunk extensions or access the detail from a
> chunk extension.
> I am using version 6.0.29. If anyone has any ideas or links on this topic it
> would be greatly appreciated.
>
Hi.
I have never heard of the term "chunk extension" before in a HTTP context.
Are you sure that this is the right term for what you are trying to find, or achieve ?
Maybe that is why you are not finding any information ?
Maybe you talking about a POST in "multipart/form-data" format ?
(and a response in a similar multi-part kind of format, although that would cause problems
with most browsers)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org