+1 (a bit late ;-)).

Thanks
-Vincent

> -----Original Message-----
> From: Christopher Lenz [mailto:[EMAIL PROTECTED]]
> Sent: 19 December 2002 12:19
> To: Cactus Developers List
> Subject: Re: [GUMP] Build Failure - jakarta-cactus-sample-servlet-13
> 
> Vincent Massol wrote:
> > ----------------------------------------------------
> > This email is autogenerated from the output from:
> > <http://cvs.apache.org/builds/gump/2002-12-18/jakarta-cactus-sample-
> servlet-13.html>
> > ----------------------------------------------------
> [snip]
> >      [java]     [junit] Testcase: testReceiveCookie took 0.048 sec
> >      [java]     [junit]     Caused an ERROR
> >      [java]     [junit] Invalid port: -1
> >      [java]     [junit] java.lang.IllegalArgumentException: Invalid
> port: -1
> >      [java]     [junit]     at
>
org.apache.commons.httpclient.cookie.CookieSpecBase.parse(CookieSpecBase
.j
> ava:167)
> >      [java]     [junit]     at
>
org.apache.commons.httpclient.cookie.CookieSpecBase.parse(CookieSpecBase
.j
> ava:265)
> >      [java]     [junit]     at
> org.apache.commons.httpclient.Cookie.parse(Cookie.java:703)
> >      [java]     [junit]     at
> org.apache.commons.httpclient.Cookie.parse(Cookie.java:631)
> >      [java]     [junit]     at
>
org.apache.cactus.WebResponse.getCookies(WebResponse.java;org/apache/cac
tu
> s/util/log/LogAspect.aj(1k):292)
> >      [java]     [junit]     at
>
org.apache.cactus.WebResponse.getCookie$ajcPostAround15(WebResponse.java
;o
> rg/apache/cactus/util/log/LogAspect.aj(1k):223)
> >      [java]     [junit]     at
>
org.apache.cactus.WebResponse.getCookie(WebResponse.java;org/apache/cact
us
> /util/log/LogAspect.aj(1k):1240)
> >      [java]     [junit]     at
> org.apache.cactus.sample.TestSampleServlet.endReceiveCookie(Unknown
> Source)
> >      [java]     [junit]     at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >      [java]     [junit]     at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:
> 39)
> >      [java]     [junit]     at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Im
> pl.java:25)
> >      [java]     [junit]     at
>
org.apache.cactus.AbstractWebTestCase.callGenericEndMethod(AbstractWebTe
st
> Case.java:182)
> >      [java]     [junit]     at
>
org.apache.cactus.AbstractWebTestCase.callEndMethod(AbstractWebTestCase.
ja
> va:235)
> >      [java]     [junit]     at
>
org.apache.cactus.AbstractWebTestCase.runGenericTest(AbstractWebTestCase
.j
> ava:263)
> >      [java]     [junit]     at
>
org.apache.cactus.AbstractWebTestCase.runTest(AbstractWebTestCase.java:3
25
> )
> >      [java]     [junit]     at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:255)
> >
> >      [java]     [junit] Testcase: testReceiveCookie
> 
> The problem here is that HttpClient seems to have become more strict
> when parsing Cookies. Cactus is specifying a port of "-1", which is
> obviously illegal, and HttpClient is (IMHO) correctly complaining
about
> that.
> 
> A possible fix would be the following: in o.a.c.ServletURL#getPort(),
> we'll default to -1 when no port is specified (line 356). Instead, we
> should probably default to the default HTTP port 80 (or 443 if the
> protocol is HTTPS). *If* the port is specified but invalid (i.e. a
> NumberFormatException is thrown), we'd still return -1.
> 
> I've tried the change on my local workspace, and the tests all run
> successfully. I also think that the behavior described above would be
> more correct than the current behavior.
> 
> What do you think? Any objections?
> 
> --
> Christopher Lenz
> /=/ cmlenz at gmx.de
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-dev-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:cactus-dev-
> [EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to