You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Piotr D <pi...@gmail.com> on 2011/01/23 11:37:10 UTC

Proxying http request/responses

Hello,

I try to proxy http request through cocoon and modify it on-the-fly. The
first step I've done was an attempt to download whole web site 'as it is'.
Web browser connects to cocoon pipeline - let's say that it is
http://localhost:8888/cocoon/loadwebsite and it retrieves proxied website
content without any modifications. I used HttpGenerator, but unfortunately
it gets only html code - the rest of the site content (CSS, images and so
on) are not downloaded. Which generators should I use additionaly and what
is their correct orded to do so?

My second question is if it possible to send POST request from cocoon to the
remote server? I've built CFORMS and pure-HTML form and in both cases when
POST request reaches HtmlGenerator, command is transformed from POST into
GET. It causes that remote server doesn't return appropriate output. Is this
any way to make sure that html command will not be modified?

Can you please give me some example code?

Thanks in advance for all hints,
Piotr