You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Vincent Massol <vm...@pivolis.com> on 2003/08/10 15:15:33 UTC
RE: WebResponse.getHeaderField() no longer contains insertedheaders
Hi David/Adam,
Adam, one comment: The version information in bugzilla is not the
version where the bug was fixed but rather the version in which the bug
was reported.
I am not aware of any bug related to headers ATM. There is one test in
Cactus about response headers:
public void testResponseAddHeaders()
{
response.addHeader("X-Test-Header1", "value1");
response.addHeader("X-Test-Header2", "value2");
}
public void endResponseAddHeaders(WebResponse theResponse)
{
String value1 =
theResponse.getConnection().getHeaderField("X-Test-Header1");
String value2 =
theResponse.getConnection().getHeaderField("X-Test-Header2");
assertEquals("value1", value1);
assertEquals("value2", value2);
}
David, can you verify it works for you too?
Would you be able to provide a simple test that proves the problem
you're having so that I can run it here?
Thanks
-Vincent
> -----Original Message-----
> From: Adam Ambrose [mailto:adam_ambrose@access-us-inc.com]
> Sent: 22 July 2003 20:34
> To: Cactus Users List
> Subject: Re: WebResponse.getHeaderField() no longer contains
> insertedheaders
>
> There's a known bug in 1.4.1 about a very similar issue.
Unfortunately,
> it is marked as "fixed" for version 1.4.1 in bugzilla, which is not
> technically true, since it was fixed in 1.5:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=16475
>
> What happens if you add 3 or more headers? I found that adding some
> extra dummy headers caused the header I wanted to be passed to the
> client.
>
> --
> Adam Ambrose <ad...@access-us-inc.com>
> Access Systems America, Inc.
>
>
> On Mon, 2003-07-21 at 21:49, David M. Karr wrote:
> > >>>>> "David" == David M Karr <dm...@earthlink.net> writes:
> >
> > David> In the past, I've built Cactus tests where I call
> > David> "HttpServletResponse.addHeader()" in my "test..." method,
in
> order to
> > David> communicate to my "end..." method some information I need
to
> check for (since
> > David> there's no other practical way for the "test..." method
to
> communicate to the
> > David> "end..." method). In my "end..." method, I use
> "WebResponse.getHeaderField()"
> > David> to retrieve the header with an agreed-upon key.
> >
> > David> This was working with Cactus 1.3.
> >
> > David> I've now updated to 1.5beta1 (because this appears to be
the
> "current"
> > David> release). My tests are now failing because the call to
> > David> "WebResponse.getHeaderField()" is not finding the header.
> Just to check, I
> > David> tried looping through the result of
> "WebResponse.getHeaderFieldNames()", and I
> > David> find that it does have some headers, just not the one I
> inserted on the
> > David> "client" side.
> >
> > David> Has this machinery changed such that I have to do this
> differently, or is this
> > David> just a bug in the beta release?
> >
> > I've now tried backing up to Cactus 1.4.1, with the same result. I
> don't
> > understand what I could be doing wrong.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
RE: WebResponse.getHeaderField() no longer contains insertedheaders
Posted by Adam Ambrose <ad...@access-us-inc.com>.
On Sun, 2003-08-10 at 06:15, Vincent Massol wrote:
> Hi David/Adam,
>
> Adam, one comment: The version information in bugzilla is not the
> version where the bug was fixed but rather the version in which the bug
> was reported.
That explains my confusion. Where I work, we update the Bugzilla
Version field to reflect the version in which the bug needs to be (and
is) fixed.
-Adam