You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2024/04/16 13:54:36 UTC

[2.1] Can I change HTTP headers sent by a generator?

All,

I realize that Cocoon 2.1 is now unsupported, but I suspect this is 
something that hasn't changed a lot since then.

I have a sitemap with a generator:

<map:generate src="http://internal/service/foo" />

Is there a way I can add custom HTTP headers to the request that will be 
made to http://internal/service/foo? I know I can add request 
parameters, but I'd like to be able to customize the Accept header 
(which currently sends "text/html, image/gif, image/jpeg, *; q=.2, */*; 
q=.2" which is weird since I would have expected it to request text/xml) 
and also forward some Cookie headers to the back-end.

Is that possible through configuration? Or through extending a class and 
using that?

In the distant past, I wrote a few small customizable components to 
forward request parameters but nothing too fancy.

Thanks,
-chris

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