Re: HttpUnit not returning all headers
Russell Gold <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
On Apr 3, 2006, at 6:08 PM, Seth Russell wrote:
> I am having a problem testing my web app. Looks like the problem is
> that httpunit is not returning all the http headers received.
>
> I am using httpunit 1.6.2 and JDK 1.5.0_06 on Linux.
>
> Is this a known bug, or is there some flag that needs to be set to get
> all headers?
>
> I have a very simple test that fails:
>
> WebResponse wr = wc.getResponse("http://127.0.0.1/sup/review/");
> System.out.println("wr: " + wr);
>
> Headers as returned by HttpUnit:
>
> wr: HttpWebResponse [url=http://127.0.0.1/sup/review/; headers=
> EXPIRES: Thu, 19 Nov 1981 08:52:00 GMT
> SERVER: Apache/1.3.33 (Unix) mod_ssl/2.8.24 OpenSSL/0.9.7a
> DATE: Mon, 03 Apr 2006 22:04:23 GMT ]
>
>
> Headers as returned from Ethereal:
>
> HTTP/1.1 200 OK
> Date: Mon, 03 Apr 2006 21:59:55 GMT
> Server: Apache/1.3.33 (Unix) mod_ssl/2.8.24 OpenSSL/0.9.7a
> Expires: Thu, 19 Nov 1981 08:52:00 GMT
> Last-Modified Mon, 03 Apr 2006 21: 59:56 GMT
this is interesting. Where is the ':' that should be after "Last-
Modified"? HttpUnit is choking on this header (apparently a bug in
Apache) and thinking that there are no more. This is clearly a bug in
HttpUnit, which need to be able to handle this case.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642