W3C home > Mailing lists > Public > xproc-dev@w3.org > February 2011

Re: p:http-request: binary content

From: Florent Georges <fgeorges@fgeorges.org>
Date: Sat, 5 Feb 2011 23:17:42 +0100
Message-ID: <AANLkTik454dzWgNN6O9VWx9hyHvbtuVZJ1dk6h+c2SkS@mail.gmail.com>
To: Norman Walsh <ndw@nwalsh.com>
Cc: XProc Dev <xproc-dev@w3.org>
On 5 February 2011 22:59, Norman Walsh wrote:
> Florent Georges writes:

>>   Is there any way, when sending binary using p:http-request,
>> to ask for not encoding it as base64, but first decoding the
>> base64 text and sending binary directly over the wire?

> No, I don't think so, but it ought to be possible to apply the
> same ext:binary technique mentioned for p:store.

  I guess so.  Actually the binary content is got from a file on
the filesystem.  The approach I took in the EXPath HTTP Client
<http://expath.org/spec/http-client> is to allow an attribute src
on the element http:body:

    <http:request ...>
       <http:body media-type="..." src="file.zip"/>

  This means the entity content of the request must be read
directly from the filesystem, which is very convenient for binary
files.  A typical use case is a pipeline used in a webapp and
accessing some resource files, or a pipeline used from a command-
line interface with files arguments.

  I am not sure though that could be implemented by an extension
in XProc while remaining a valid pipeline.


Florent Georges
Received on Saturday, 5 February 2011 22:18:36 UTC

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