webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Functions
webkitpy.thirdparty.mod_pywebsocket.http_header_util Namespace Reference

Classes

class  ParsingState
 

Functions

def peek (state, pos=0)
 
def consume (state, amount=1)
 
def consume_string (state, expected)
 
def consume_lws (state)
 
def consume_lwses (state)
 
def consume_token (state)
 
def consume_token_or_quoted_string (state)
 
def quote_if_necessary (s)
 
def parse_uri (uri)
 

Function Documentation

◆ consume()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.consume (   state,
  amount = 1 
)
Consumes specified amount of bytes from the head and returns the
consumed bytes. If there's not enough bytes to consume, returns None.

◆ consume_lws()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.consume_lws (   state)
Consumes a LWS from the head. Returns True if any LWS is consumed.
Otherwise, returns False.

LWS = [CRLF] 1*( SP | HT )

◆ consume_lwses()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.consume_lwses (   state)
Consumes *LWS from the head.

◆ consume_string()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.consume_string (   state,
  expected 
)
Given a parsing state and a expected string, consumes the string from
the head. Returns True if consumed successfully. Otherwise, returns
False.

◆ consume_token()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.consume_token (   state)
Consumes a token from the head. Returns the token or None if no token
was found.

◆ consume_token_or_quoted_string()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.consume_token_or_quoted_string (   state)
Consumes a token or a quoted-string, and returns the token or unquoted
string. If no token or quoted-string was found, returns None.

◆ parse_uri()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.parse_uri (   uri)
Parse absolute URI then return host, port and resource.

◆ peek()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.peek (   state,
  pos = 0 
)
Peeks the character at pos from the head of data.

◆ quote_if_necessary()

def webkitpy.thirdparty.mod_pywebsocket.http_header_util.quote_if_necessary (   s)
Quotes arbitrary string into quoted-string.