Hi,
 
I need to set request headers when accessing an http: URL in a sitemap
pipeline.
 
I've digged into the source and came up with a solution to inherit from the
class org.apache.excalibur.source.impl.HTTPClientSourceFactory and override
the method getSource(String, Map). The second parameter is a Map which is
added to the GET request as header parameters by the super class. This map
seems to be null all the time. So I create a HashMap, populate it with my
parameters and pass it to the super class implementation. Finally I needed
to register my custom component in the configuration file cocoon.xconf.
Done.
 
Since all the building bricks already exist in Cocoon, I wonder if this has
been done already. There must be an even simpler solution, but I could not
figure it. Any hints would be welcome.
 
Kind regards,
Christian Schlichtherle
-- 
Schlichtherle IT Services
Wittelsbacherstr. 10a
10707 Berlin
 
Tel: +49 (0) 30 / 34 35 29 29
Mobil: +49 (0) 173 / 27 12 470
mailto:[EMAIL PROTECTED]
http://www.schlichtherle.de <http://www.schlichtherle.de/> 
 

Reply via email to