cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aqu...@ebi.ac.uk
Subject HTTP post + headers (Cocoon proxying)
Date Sat, 21 Aug 2004 11:45:44 GMT
I'm designing an application that handles some HTTP requests locally and
pipes other requests to a remote server (Cocoon should act as a proxy
rather than simply redirect to the remote server). Request parameters to
Cocoon can be sent either by HTTP GET or POST. Requests forwarded to the
remote server will be sent by HTTP POST only. The remote server will
return HTTP headers in addition to the standard headers (eg. "X-INT-CODE
200"). Locally-handled requests must also generate HTTP headers, including
a HTTP header for error codes. All responses are XML.

Questions:
(1) Can I pass POSTed parameters to an XSLT transformer?
(2) How should I handle requests and responses to the remote server
(proxying)? (eg. XSP, JSP, servlet ...)
(3) Can I handle errors other than 404 and 500 in the pipeline?
(4) What is the best method to set HTTP headers in this context?

A rough outline of the sitemap is as follows:

<map:pipeline>
  <map:match pattern="app/entry">
     <!-- generate XML from local flat file or database -->
     <!-- transform with XSLT (pass in POST or GET parameters -->
     <!-- set HTTP headers -->
     <!-- serialise to XML -->
  </map:match>
  <map:match pattern="app/**">
     <!-- POST request to remote server -->
     <!-- set HTTP headers based on headers from remote server -->
     <!-- serialise to XML -->
  </map:match>
  <map:handle-errors>
     <!-- transform with XSLT -->
     <!-- set HTTP headers (incl. error code) -->
     <!-- serialise to XML -->
  </map:handle-errors>
</map:pipeline>

Any advice would be much appreciated.

Thanks,

Antony

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message