[Fwd: How to change the request headers in the Preprocessor class]

-------- Message transféré --------
> De: Guido García Bernardo <ggarciab@itdeusto.com>
> À: public-mobileok-checker-request@w3.org
> Sujet: How to change the request headers in the Preprocessor class
> Date: Mon, 08 Oct 2007 09:56:35 +0000
> 
> Hello,
> 
> Could it be possible to allow the user to change the request headers in 
> the Preprocessor class ?
> 
> Now there is a method:
> 
> void preprocess() throws TestException {
>     final URI baseUri = results.getURI();
>     try {
>         final HTTPXHTMLResource resource = new HTTPXHTMLResource(baseUri);
>     ...
> }
> 
> And it would be great to add the following one (or to add the 
> additionalRequestHeaders to the constructor) :
> 
> void preprocess(final Map<String, String> additionalRequestHeaders) 
> throws TestException {
>     final URI baseUri = results.getURI();
>     try {
>         final HTTPXHTMLResource resource = new 
> HTTPXHTMLResource(baseUri, additionalRequestHeaders);
>     ...
> }
> 
> I am working on a crawler based on mobileok, and that might help us a 
> lot to change some headers (User-Agent, Accept-Language ...).  It could 
> be useful in other use cases, too.
> 
> By the way, is there any reason to make this Preprocessor class final ?
> Thank you,
> Guido García Bernardo

Received on Monday, 8 October 2007 12:13:29 UTC