On Fri, 2004-09-10 at 00:45, [EMAIL PROTECTED] wrote:
> On Thu, 09 Sep 2004 10:01:03 +0200, "Eric van der Vlist"
> <[EMAIL PROTECTED]> said:
> > Hi,
> >....
> > Also, how can I control the MVC model to send a 201 HTTP answer code
> > with its corresponding location to a POST request? 
> > 
> 
> Sorry, missed the second question.  Below is modified foo.xpl,
> from attachment of my earlier reply, that sends back a 201.
> 
> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline";     
>         xmlns:oxf="http://www.orbeon.com/oxf/processors"; >
>   <p:processor name="oxf:html-serializer" > 
>     <p:input name="config" >
>       <config>
>         <status-code>201</status-code>
>       </config> 
>     </p:input>
>     <p:input name="data">
>       <html>Hello</html>
>     </p:input>
>   </p:processor> 
> </p:config>
> 
> Believe this is covered in the serializers section of 
> the doc. ( See HTTP serializers )

Yes, shame on me, I should have RTFM more carefully.

Fortunately for me, the second par of my second question (with its
corresponding location) doesn't seem to be covered there :) ...

In the 201 HTTP response, I'd need to send the location where the posted
document has been published (as a header).

Borrowing Paul Prescod's example, a 201 HTTP response looks like:

+++++++++++++++++++++++++++++++++++++++++
201 Created
Location: /sessions/42

<challenge session="/sessions/42">
<p>Very well. What... is your name?</p>
<method>PUT</method> your answer in 
<uri>/sessions/42/name</uri>
</challenge>
+++++++++++++++++++++++++++++++++++++++++

The element "<status-code>201</status-code>" will take care of "201
Created", but how can I send the "Location: /sessions/42" header?

Thanks,

Eric
-- 
Freelance consulting and training.
                                            http://dyomedea.com/english/
Upcoming XML schema languages tutorial:
 - Portland   -half day-   (27/07/2004)        http://masl.to/?E6ED13728
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to