[JIRA] Resolved: (GRIZZLY-1530) Please add descriptive text for IllegalArgumentException if "Cookie:" is empty

  • From: "Ryan Lubke (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [JIRA] Resolved: (GRIZZLY-1530) Please add descriptive text for IllegalArgumentException if "Cookie:" is empty
  • Date: Fri, 21 Jun 2013 19:27:51 +0000 (UTC)
  • Auto-submitted: auto-generated


     [ 
https://java.net/jira/browse/GRIZZLY-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ryan Lubke resolved GRIZZLY-1530.
---------------------------------

    Fix Version/s: 2.3.4
                   3.0
       Resolution: Fixed

Changes applied:

2.3.x: 57c6dcd1e979c472b5574e7a4d1a2a4e03fd6e01
master: 24dcfd05112929d47b2be051021809329be4d845

> Please add descriptive text for IllegalArgumentException if "Cookie:" is 
> empty
> ------------------------------------------------------------------------------
>
>                 Key: GRIZZLY-1530
>                 URL: https://java.net/jira/browse/GRIZZLY-1530
>             Project: grizzly
>          Issue Type: Improvement
>         Environment: Linux
>            Reporter: chammers
>            Assignee: Ryan Lubke
>             Fix For: 2.3.4, 3.0
>
>
> I got the following exception because the client sent a HTTP Header line 
> "Cookie: " without any cookies within.
> It would be nice if the Exception hat told me that the received cookie was 
> empty as it's quite clear from the code:
>   public class CookieParserUtils {
>     public static void parseClientCookies(Collection<Cookie> cookies,
>     ...
>         if (len <= 0 || buffer == null) {
>             throw new IllegalArgumentException();
>         }
> Jun 20 00:53:33 localhost [OXWorker-0000004] ERROR: 
> org.glassfish.grizzly.servlet.ServletHandler: service exception:
> Jun 20 00:53:33 java.lang.IllegalArgumentException 
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.util.CookieParserUtils.parseClientCookies(CookieParserUtils.java:353)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.util.CookieParserUtils.parseClientCookies(CookieParserUtils.java:106)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.Cookies.processCookies(Cookies.java:220)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.Cookies.get(Cookies.java:128)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.server.Request.parseCookies(Request.java:1927)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.server.Request.getCookies(Request.java:1521)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.servlet.ServletHandler.doServletService(ServletHandler.java:220)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.servlet.ServletHandler.service(ServletHandler.java:194)
> Jun 20 00:53:33 localhost     at 
> com.openexchange.http.grizzly.service.http.OSGiMainHandler.service(OSGiMainHandler.java:190)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.server.HttpHandlerChain.service(HttpHandlerChain.java:196)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.http.server.OXHttpServerFilter.handleRead(OXHttpServerFilter.java:206)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:265)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:78)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:770)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
> Jun 20 00:53:33 localhost     at 
> org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
> Jun 20 00:53:33 localhost     at 
> com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.runTask(CustomThreadPoolExecutor.java:799)
> Jun 20 00:53:33 localhost     at 
> com.openexchange.threadpool.internal.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:826)
> Jun 20 00:53:33 localhost     at java.lang.Thread.run(Thread.java:662)

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

        


[JIRA] Created: (GRIZZLY-1530) Please add descriptive text for IllegalArgumentException if "Cookie:" is empty

chammers (JIRA) 06/20/2013

[JIRA] Assigned: (GRIZZLY-1530) Please add descriptive text for IllegalArgumentException if "Cookie:" is empty

Ryan Lubke (JIRA) 06/21/2013

[JIRA] Resolved: (GRIZZLY-1530) Please add descriptive text for IllegalArgumentException if "Cookie:" is empty

Ryan Lubke (JIRA) 06/21/2013
Terms of Use; Privacy Policy; Copyright ©2013-2016 (revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close