commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@bluewin.ch>
Subject Re: [HttpClient] trace question
Date Sun, 30 May 2004 15:25:48 GMT
Reidar,
I believe HTTP TRACE can be of interest only when executed via a proxy
or a gateway. From your code it is not clear whether that is the case. I
suspect that TRACE method executed directly against a target host will
not produce any Via response headers

Oleg


On Sun, 2004-05-30 at 00:49, Reidar Horning wrote:
> Hello,
> 
> I've tested the trace method of HttpClient using the code below.
> Unfortunately I never get "Via"-fields in the header, declared in
> rfc2616. 
> 
> Can somebody explain this behaviour?
> 
> Much thanks in advance! 
> Reidar
> 
> Code:
> 
> HttpClient hc = new HttpClient();
> TraceMethod m = new TraceMethod("http://jakarta.apache.org");
> hc.executeMethod(m);
> 
> Header[] h = m.getResponseHeaders();
> for (int i = 0; i < h.length; i++) {
>   System.out.println(h[i].getName());
> }
> ...
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
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