RE: Is it possible to set response headers from within a sitemap?

2008-07-25 Thread Philip Fennell
Andy,

Thank you very much for the info.

It works a treat :-)


Regards

Philip Fennell
XSLT Developer (Content Management Culture)

BBC Future Media  Technology
Media Village, 201 Wood Lane London W12 7TP 
BC4 C4, Broadcast Centre

T: 0208 0085318


-Original Message-
From: Andy Stevens [mailto:[EMAIL PROTECTED] 
Sent: 24 July 2008 15:41
To: users@cocoon.apache.org
Subject: Re: Is it possible to set response headers from within a
sitemap?

2008/7/24 Philip Fennell [EMAIL PROTECTED]:
 Is there any way that I can set response headers from the 
 sitemap/Cocoon?

...

 I'm using Cocoon 2.2

Isn't that what the HttpHeaderAction does?
http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sit
emap-components/src/main/java/org/apache/cocoon/acting/HttpHeaderAction.
java?view=markup


Andy.
--
http://pseudoq.sourceforge.net/  Open source java sudoku application

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is it possible to set response headers from within a sitemap?

2008-07-24 Thread Philip Fennell
I am making use of the map:select type=request-method for a RESTful
Web Service I'm working on.

In the case where a method e.g. DELETE is not supported by the service I
could include:

map:otherwise
map:generate type=request/
map:serialize type=application/xml status-code=405
label=Method Not Allowed/
/map:otherwise

as the fallback case in the selector.

However, the HTTP spec. says that when returning a 405 status code, the
response must also include an Allow header with the methods that are
supported, e.g. Allow: GET, PUT, POST.

Is there any way that I can set response headers from the
sitemap/Cocoon?

If not, would it be possible to create a custom serialiser variant of
the XML serializer that accepted parameters for setting response
headers?

I'm using Cocoon 2.2


Regards

Philip Fennell
XSLT Developer (Content Management Culture)

BBC Future Media  Technology
Media Village, 201 Wood Lane London W12 7TP 
BC4 C4, Broadcast Centre

T: 0208 0085318


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to set response headers from within a sitemap?

2008-07-24 Thread Andy Stevens
2008/7/24 Philip Fennell [EMAIL PROTECTED]:
 Is there any way that I can set response headers from the
 sitemap/Cocoon?

...

 I'm using Cocoon 2.2

Isn't that what the HttpHeaderAction does?
http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/acting/HttpHeaderAction.java?view=markup


Andy.
-- 
http://pseudoq.sourceforge.net/  Open source java sudoku application

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]