[jboss-jira] [JBoss JIRA] Updated: (JBAS-4117) CTS Challenge for getCookies tests

Stan Silvert (JIRA) jira-events at lists.jboss.org
Mon Feb 19 16:18:32 EST 2007


     [ http://jira.jboss.com/jira/browse/JBAS-4117?page=all ]

Stan Silvert updated JBAS-4117:
-------------------------------

    Attachment: servlet_jsh_httpservletrequest.ear

EAR file used by J2EE 1.4 TCK test com/sun/ts/tests/servlet/api/javax_servlet_http/httpservletrequest/URLClient.java#getCookiesTest

> CTS Challenge for getCookies tests
> ----------------------------------
>
>                 Key: JBAS-4117
>                 URL: http://jira.jboss.com/jira/browse/JBAS-4117
>             Project: JBoss Application Server
>          Issue Type: CTS Challenge
>      Security Level: Public(Everyone can see) 
>          Components: Web (Tomcat) service
>    Affects Versions: JBossAS-4.2.0.CR1
>            Reporter: Stan Silvert
>         Assigned To: Shelly McGowan
>            Priority: Critical
>         Attachments: servlet_jsh_httpservletrequest.ear
>
>
> In the J2EE 1.4 TCK running against JBoss AS 4.2, we have two "getCookie" tests failing:
> com/sun/ts/tests/servlet/api/javax_servlet_http/httpservletrequest/URLClient.java#getCookiesTest
> com/sun/ts/tests/servlet/api/javax_servlet_http/httpservletrequestwrapper/URLClient.java#getCookiesTest
> They are both failing because the TCK client is sending two copies of the same cookie on each request.  The spec says that the cookies returned by the servlet container should reflect what was sent by the client.  However, the TCK test servlet reports the duplicate cookie as an error.
> I confirmed that this is an error in the TCK two different ways.  First, I enabled the RequestDumperValve.  You do this by adding this to server.xml:
> <Valve className="org.apache.catalina.valves.RequestDumperValve" />
> The RequestDumperValve dumps the raw data for each HttpRequest sent to Tomcat.  When you do this for the getCookiesTest you get:
> 15:36:16,125 INFO  [[localhost]] REQUEST URI       =/servlet_jsh_HSReqWrapper_web/TestServlet
> 15:36:16,125 INFO  [[localhost]]           authType=null
> 15:36:16,125 INFO  [[localhost]]  characterEncoding=null
> 15:36:16,125 INFO  [[localhost]]      contentLength=-1
> 15:36:16,125 INFO  [[localhost]]        contentType=null
> 15:36:16,125 INFO  [[localhost]]        contextPath=/servlet_jsh_HSReqWrapper_web
> 15:36:16,125 INFO  [[localhost]]             cookie=cookie=value
> 15:36:16,125 INFO  [[localhost]]             cookie=cookie=value
> 15:36:16,125 INFO  [[localhost]]             header=cookie=cookie=value
> 15:36:16,125 INFO  [[localhost]]             header=cookie=cookie=value
> 15:36:16,125 INFO  [[localhost]]             header=user-agent=Jakarta Commons-HttpClient/3.0
> 15:36:16,125 INFO  [[localhost]]             header=host=localhost:8080
> 15:36:16,135 INFO  [[localhost]]             locale=en_US
> 15:36:16,145 INFO  [[localhost]]             method=GET
> 15:36:16,145 INFO  [[localhost]]          parameter=testname=getCookiesTest
> 15:36:16,145 INFO  [[localhost]]           pathInfo=null
> 15:36:16,145 INFO  [[localhost]]           protocol=HTTP/1.1
> 15:36:16,145 INFO  [[localhost]]        queryString=testname=getCookiesTest
> 15:36:16,145 INFO  [[localhost]]         remoteAddr=127.0.0.1
> 15:36:16,145 INFO  [[localhost]]         remoteHost=127.0.0.1
> 15:36:16,145 INFO  [[localhost]]         remoteUser=null
> 15:36:16,145 INFO  [[localhost]] requestedSessionId=null
> 15:36:16,145 INFO  [[localhost]]             scheme=http
> 15:36:16,145 INFO  [[localhost]]         serverName=localhost
> 15:36:16,145 INFO  [[localhost]]         serverPort=8080
> 15:36:16,145 INFO  [[localhost]]        servletPath=/TestServlet
> 15:36:16,145 INFO  [[localhost]]           isSecure=false
> As you can clearly see, the cookie was sent twice.
> The second way I verified this was to manually deploy the test EAR and hit it with a manual request containing only one copy of the cookie.  I'll attach the test ear in case anyone else wants to try this.  To manually run the test, I use the Firefox plugin "Live HTTP Headers" to set a single cookie "cookie=value".  Then, I submit this URL:
> http://localhost:8080//servlet_jsh_httpservletrequest_web/TestServlet?testname=getCookiesTest
> The result I get in the browser is "Test PASSED".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list