commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject HTTP Client API comment and Q about HttpException
Date Sun, 02 Dec 2001 00:01:00 GMT

I hate asking this type of stuff on the -dev list, but it looks like jakarta-commons doesn't
exist any more.

This API doesn't make sense to me:

To get the value of a HTTP response header (e.g. 'text/html' part in 'Content-type: text/html'
header) I have to do this:

Header header = ....


Wouldn't it make more sense to call getValue() instead of getName()?

Also, it looks like HTTP Client is super strict and throws HttpException when it encounters
responses such as these two:

$ GET -S -e -d

GET --> 200 OK

Connection: close

Date: Sat, 01 Dec 2001 23:49:39 GMT

Server: Apache/1.3.6 (Unix) mod_oas/4.65

Content-Type: text/html

Client-Date: Sat, 01 Dec 2001 23:49:42 GMT

Client-Response-Num: 1

Client-Transfer-Encoding: chunked

Title: Ananzi South Africa - Search Engine

$ GET -S -e -d

GET --> 200 OK

Connection: close

Date: Sat, 01 Dec 2001 23:59:57 GMT

Accept-Ranges: bytes

ETag: "8d78a-335a-3c049438"

Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 DAV/1.0.2 PHP/4.0.4pl1

Content-Length: 13146

Content-Type: text/html

Content-Type: text/html; charset=windows-1252

Last-Modified: Wed, 28 Nov 2001 07:37:28 GMT

Client-Date: Sat, 01 Dec 2001 23:49:53 GMT

Client-Response-Num: 1

The HttpException message is:

"Error in parsing the status line from the response: null"

What is it not getting that it needs?



_________________________________________________________________ Solutions for Your Life 
Check out the most exciting women's community on the Web

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message