Package org.eclipse.jetty.fcgi.parser
Class Parser
java.lang.Object
org.eclipse.jetty.fcgi.parser.Parser
- Direct Known Subclasses:
ClientParser
,ServerParser
The FastCGI protocol exchanges frames.
struct frame { ubyte version; ubyte type; ushort requestId; ushort contentLength; ubyte paddingLength; ubyte reserved; ubyte[] content; ubyte[] padding; }
Depending on the type
, the content may have a different format,
so there are specialized content parsers.
A typical exchange is:
BEGIN_REQUEST PARAMS (length > 0) PARAMS (length == 0 to signal end of PARAMS frames) [STDIN (length > 0 in case of request content)] STDIN (length == 0 to signal end of STDIN frames and end of request) ... STDOUT (length > 0 with HTTP headers and HTTP content) STDOUT (length == 0 to signal end of STDOUT frames) [STDERR (length > 0)] [STDERR (length == 0 to signal end of STDERR frames)] END_REQUEST
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
eof()
protected abstract ContentParser
findContentParser
(FCGI.FrameType frameType) boolean
parse
(ByteBuffer buffer)
-
Field Details
-
headerParser
-
-
Constructor Details
-
Parser
-
-
Method Details
-
parse
- Parameters:
buffer
- the bytes to parse- Returns:
- true if the caller should stop parsing, false if the caller should continue parsing
-
findContentParser
-
eof
public boolean eof()
-