commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: [Digester] - How to add extra data to http headers
Date Wed, 24 Mar 2004 15:46:48 GMT
Quoting Vilson farias <vilson.farias@digitro.com.br>:

> Greetings,
> 
>   I have new rules for http requests here in my company that force
> applications to use specifc user agent strings in all html request headers. 
> 
>   I'd like to change user agent for digester requests. Actually I just call
> digester.parse (java.lang.String uri)and everything is done internally by
> Digester but I think I'll need to do the job by myself and start executing 
> digester.parse(java.io.InputStream input) instead of old way. Is it a good
> approach? Is there an easier way to do it?
> 
>   Here is an example of a modified html header :
> 
> GET /dispositivo.xml HTTP/1.1
> User-Agent: Digitro_Application-1.0.1
> Host: bxs00.daf.digitro.com.br:9876
> Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> Connection: keep-alive
> 
> Best regards,

It's not clear to me what Digester has to do with HTTP headers.  Does this mean
that you are calling Digester.parse() with an "http" URL?  If so, you'll
probably need to use separate code (perhaps with [httpclient]) to get the
resource and copy it in to some local file, and then parse it locally.

> José Vilson de Mello de Farias

Craig


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message