2013/4/19  <ma...@apache.org>:
> Author: markt
> Date: Fri Apr 19 15:20:53 2013
> New Revision: 1469891
>
> URL: http://svn.apache.org/r1469891
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54822
> Fix handling of query strings with SPDY.
> Based on a patch by Sheldon Shao.
>
> Modified:
>     tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
>
> Modified: tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java?rev=1469891&r1=1469890&r2=1469891&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java (original)
> +++ tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java Fri Apr 19 
> 15:20:53 2013
> @@ -533,7 +533,22 @@ public class SpdyProcessor extends Abstr
>                  if (valueLen > frame.remaining()) {
>                      throw new IOException("Name too long");
>                  }
> -                request.requestURI().setBytes(frame.data, frame.off, 
> valueLen);
> +
> +                request.unparsedURI().setBytes(frame.data, frame.off, 
> valueLen);
> +                int questionPos = -1;
> +                int end = frame.off + valueLen;
> +                for(int k = frame.off; k < end; k ++) {
> +                    if (frame.data[k] == '?') {
> +                        questionPos = k;

You are missing a "break;" here.

> +                    }
> +                }
> +
> +                if (questionPos >= 0) {
> +                    request.queryString().setBytes(frame.data, questionPos + 
> 1, end - questionPos - 1);
> +                    request.requestURI().setBytes(frame.data, frame.off, 
> questionPos - frame.off);
> +                } else {
> +                    request.requestURI().setBytes(frame.data, frame.off, 
> valueLen);
> +                }
>                  if (SpdyContext.debug) {
>                      System.err.println("URL= " + request.requestURI());
>                  }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to