Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2015-11-04 04:44:42 -0500
committerSimone Bordet2015-11-04 04:45:01 -0500
commit473d65884267a7fc57e10715f0c31dff8bcbe871 (patch)
tree5b49783624b83cef93d8e5cfeb95f6b3f5cb8060
parent2a765afdc63c12c3371c1defc73c88eaf948842f (diff)
downloadorg.eclipse.jetty.project-473d65884267a7fc57e10715f0c31dff8bcbe871.tar.gz
org.eclipse.jetty.project-473d65884267a7fc57e10715f0c31dff8bcbe871.tar.xz
org.eclipse.jetty.project-473d65884267a7fc57e10715f0c31dff8bcbe871.zip
481385 - Incorrect parsing of END_REQUEST frames.
-rw-r--r--jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/parser/EndRequestContentParser.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/parser/EndRequestContentParser.java b/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/parser/EndRequestContentParser.java
index b8173bf494..dc07bd544e 100644
--- a/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/parser/EndRequestContentParser.java
+++ b/jetty-fcgi/fcgi-client/src/main/java/org/eclipse/jetty/fcgi/parser/EndRequestContentParser.java
@@ -20,6 +20,16 @@ package org.eclipse.jetty.fcgi.parser;
import java.nio.ByteBuffer;
+/**
+ * <p>Parser for the END_REQUEST frame body.</p>
+ * <pre>
+ * struct end_request_body {
+ * uint applicationStatus;
+ * ubyte protocolStatus;
+ * ubyte[3] reserved;
+ * }
+ * </pre>
+ */
public class EndRequestContentParser extends ContentParser
{
private final Parser.Listener listener;
@@ -80,7 +90,7 @@ public class EndRequestContentParser extends ContentParser
}
else
{
- state = State.APPLICATION_BYTES;
+ state = State.RESERVED_BYTES;
cursor = 0;
break;
}
@@ -88,7 +98,7 @@ public class EndRequestContentParser extends ContentParser
case RESERVED_BYTES:
{
buffer.get();
- if (++cursor == 0)
+ if (++cursor == 3)
{
onEnd();
reset();

Back to the top