W3C home > Mailing lists > Public > xproc-dev@w3.org > April 2010

p:http-request - implementing HEAD

From: <Toman_Vojtech@emc.com>
Date: Tue, 13 Apr 2010 07:34:10 -0400
Message-ID: <997C307BEB90984EBE935699389EC41C011AF59F@CORPUSMX70C.corp.emc.com>
To: <xproc-dev@w3.org>
Hi folks,

I am currently adding support for the HTTP HEAD method to p:http-request
in Calumet. What do you think is the expected/preferred behavior of the
following pipeline:

  <p:input port="source">
      <c:request xmlns:c="http://www.w3.org/ns/xproc-step"

Because c:request/@detailed is not specified and therefore defaults to
"false", the response should be handled according to these rules in the
XProc spec:

Otherwise (the detailed attribute is not specified or its value is
false), the response to the request is handled as follows:
1. If the media type (as determined by the override-content-type
attribute or the Content-Type response header) is an XML media type, the
entity is decoded if necessary, then parsed as an XML document and
produced on the result output port as the entire output of the step.
2. Otherwise, the entity body of the response is converted into a c:body
or c:multipart element via the rules given in Section,
"Converting Response Entity Bodies".

Obviously, with the HEAD method, there is no response body, so should
p:http-request fail with a dynamic error in this case? Or should it
produce some kind of an empty c:body (or c:multipart/c:body) element?

The same probably applies to other methods such as DELETE.

My inclination is to raise a dynamic error, but perhaps there are people
who feel differently. Norm, how does Calabash deal with this case?


Vojtech Toman
Principal Software Engineer
EMC Corporation
Received on Tuesday, 13 April 2010 11:34:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:06 UTC