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

Christopher Schultz <[email protected]> Tue, 16 Apr 2024 09:54:36 -0400
Newsgroups gmane.text.xml.cocoon.user
Message-ID <[email protected]>
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