ietf-openproxy
[Top] [All Lists]

Enhancing the Encapsulated header

2001-05-07 13:20:26
Martin,

While discussing using chunked encoding versus the Encapsulated
header to demarcate the request/response headers retuned, you write
in the "ICAP issues" thread:

But now: If no HTTP body data is given, I have no value in the
"Encapsulated" header that tells me how long the last HTTP header
is.

Well, what if there was such a value?  What if the directives in the
Encapsulated header were extended to have one in the form "no-body=n"?
So, if an ICAP request had the following header:

        Encapsulated; req-hdr=0, res-hdr=100, no-body=150

an ICAP server would be able to determine that the response headers
were fifty bytes long, just as it can when

        Encapsulated: req-hdr=0, res-hdr=100, res-body=150

is sent.  The "no-body" directive could be used in place of either
the "req-body" or "res-body" directives when no encapsulated body
is present.  No other changes to the ICAP request/response message
format would be needed.

The addition of this new directive would be quite compatible with
ICAP clients and servers written to the current ICAP draft.  This 
is an important real-world concern.  If an ICAP server received a 
"no-body" directive but did not understand it, the server could 
safely ignore it because the rest of the message format is unchanged.
Hopefully most servers would be written to be tolerant of directives 
that aren't understood.  It would be easy to modify (the hopefully
few) ICAP servers that did reject requests because of the new directive.

I hope that you're not proposing to do away with the Encapsulated
header entirely, or even making it optional.  The ICAP spec requires
the header (see section 5.4) partly because it is needed for other 
purposes than just denoting the length of the headers.  For example, 
a response to a REQMOD request may have a rewritten request, or it 
may have *response* headers and a body that should be sent back to 
the client.  The Encapsulated header is the way a REQMOD client is 
supposed to tell the difference between the two types of responses.

It's unfortunate that the confusing statement in section 5.8.3:

        "Note that chunking MUST NOT break header sets into 
         multiple chunks."

wasn't removed when all the examples in the ICAP spec were being
changed from chunking the headers to relying solely on the Encap-
sulated header.  I think that statement should be removed in the 
next release of the ICAP draft.

Regards,

Jeff


<Prev in Thread] Current Thread [Next in Thread>
  • Enhancing the Encapsulated header, Merrick, Jeffrey <=