Some code I tested based on:

   DefaultHttpClient httpclient = new DefaultHttpClient();
   httpclient.setRedirectStrategy(new DefaultRedirectStrategy());
   HttpGet HTTPGet = new HttpGet(aDomURL);
   HttpResponse HTTPRspns = httpclient.execute(HTTPGet);
   Header[] Hdrs = HTTPRspns.getAllHeaders();
   for (int i = 0; (i < Hdrs.length); ++i) { System.err.println(Hdrs[i]); }

 (to me) looks very different from what you get using $ wget
--server-response --no-verbose

 why is that? I could imagine some servers may "get smart" about
clients hittign them, but shouldn't you get pretty much the same
response?

 Also I would like to get the most exhaustive information I could
possibly get from the server. Am I making use of the API in a smart
way? Why is it, it is not, for example, indicating an eTag?

 thank you
 lbrtchx
// __ java ...

Server: Apache
Content-Location: pg11.txt.utf8
Vary: negotiate,accept-encoding
TCN: choice
X-Rate-Limiter: php
Cache-Control: max-age=86400
X-Frame-Options: sameorigin
Content-Type: text/plain; charset=utf-8
Content-Length: 167517
X-Powered-By: 3
Date: Fri, 22 Jun 2012 19:15:55 GMT
X-Varnish: 1675817004
Age: 0
Via: 1.1 varnish
Connection: keep-alive

$ wget --server-response --no-verbose
http://www.gutenberg.org/ebooks/11.txt.utf-8
Server: Apache
Content-Location: pg11.txt.utf8
Vary: negotiate,accept-encoding
TCN: choice
X-Rate-Limiter: php
Cache-Control: max-age=86400
X-Frame-Options: sameorigin
Content-Type: text/plain; charset=utf-8
Content-Length: 167517
X-Powered-By: 2
X-Hits: 2
Date: Fri, 22 Jun 2012 19:02:31 GMT
X-Varnish: 35841995 35837303
Age: 245
Via: 1.1 varnish
Connection: keep-alive

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to