MCPcopy Create free account

hub / github.com/gobwas/httphead / functions

Functions107 in github.com/gobwas/httphead

↓ 20 callersMethodEqual
Equal reports whether option is equal to b.
option.go:52
↓ 18 callersFunctionNewOption
NewOption creates named option with given parameters.
option.go:40
↓ 11 callersMethodwrite
(p []byte)
writer.go:89
↓ 8 callersMethoddata
()
option.go:167
↓ 6 callersMethodIsToken
IsToken reports whether octet is token.
octet.go:48
↓ 5 callersMethodIsSpace
IsSpace reports whether octet is space (SP or HT).
octet.go:45
↓ 5 callersFunctionScanOptions
ScanOptions parses data in this form: values = 1#value value = token *( ";" param ) param = token [ "=" (token | quoted-string) ] It calls given cal
httphead.go:195
↓ 5 callersMethodString
String represents option as a string.
option.go:35
↓ 4 callersMethodBytes
Bytes returns current token bytes.
lexer.go:150
↓ 4 callersMethodCopy
Copy copies all underlying []byte slices into p and returns new Option. Note that p must be at least of opt.Size() length.
option.go:21
↓ 4 callersFunctionParseVersion
ParseVersion parses major and minor version of HTTP protocol. It returns parsed values and true if parse is ok.
head.go:103
↓ 4 callersMethodSet
Set sets value by key.
option.go:130
↓ 4 callersMethodSize
Size returns number of bytes need to be allocated for use in opt.Copy.
option.go:15
↓ 4 callersFunctionisComma
(b []byte)
httphead.go:323
↓ 4 callersMethodresetItem
()
lexer.go:168
↓ 3 callersFunctionIntFromASCII
IntFromASCII converts ascii encoded decimal numeric value from HTTP entities to an integer.
head.go:197
↓ 3 callersMethodScan
Scan maps data to name and value pairs. Usually data represents value of the Cookie header.
cookie.go:49
↓ 3 callersFunctionScanTokens
ScanTokens parses data in this form: list = 1#token It returns false if data is malformed.
httphead.go:18
↓ 3 callersFunctionmemset
(dst []byte, v byte)
httphead_test.go:448
↓ 3 callersFunctionsplit3
(p []byte, sep byte)
head.go:248
↓ 3 callersFunctionwriteTokenSanitized
writeTokenSanitized writes token as is or as quouted string if it contains non-token characters. Note that is is not expects LWS sequnces be in s, ca
writer.go:55
↓ 2 callersMethodIsControl
IsControl reports whether octet is CTL.
octet.go:39
↓ 2 callersMethodIsSeparator
IsSeparator reports whether octet is separator.
octet.go:42
↓ 2 callersMethodNext
Next scans for next token. It returns true on successful scanning, and false on error or EOF.
lexer.go:44
↓ 2 callersFunctionParseOptions
ParseOptions parses all header options and appends it to given slice of Option. It returns flag of successful (wellformed input) parsing. Note that a
httphead.go:46
↓ 2 callersFunctionRemoveByte
RemoveByte returns data without c. If c is not present in data it returns the same slice. If not, it copies data without c.
lexer.go:288
↓ 2 callersFunctionScanUntil
ScanUntil scans for first non-escaped character c in given data. It returns index of matched c and -1 if c is not found.
lexer.go:236
↓ 2 callersMethodSelect
Select parses header data and appends it to given slice of Option. It also returns flag of successful (wellformed input) parsing.
httphead.go:111
↓ 2 callersMethodSkipEscaped
SkipEscaped skips all bytes until first occurence of non-escaped c.
lexer.go:129
↓ 2 callersMethodType
Type reports current token type.
lexer.go:145
↓ 2 callersFunctionWriteOptions
WriteOptions write options list to the dest. It uses the same form as {Scan,Parse}Options functions: values = 1#value value = token *( ";" param ) par
writer.go:21
↓ 2 callersMethodcopy
(dst []byte)
option.go:178
↓ 2 callersFunctiondumpActStd
(act []cookieTuple, std []*http.Cookie)
cookie_test.go:355
↓ 2 callersMethodfetchComment
()
lexer.go:218
↓ 2 callersMethodfetchQuotedString
()
lexer.go:202
↓ 2 callersFunctionisSemicolon
(b []byte)
httphead.go:326
↓ 2 callersFunctionrandASCII
(dst []byte)
httphead_test.go:119
↓ 2 callersFunctiontrim
(p []byte)
head.go:266
↓ 1 callersMethodAdvance
Advance moves current position index at n bytes. It returns true on successful move.
lexer.go:103
↓ 1 callersMethodBuffered
Buffered reporst how many bytes there are left to scan.
lexer.go:97
↓ 1 callersMethodFetchUntil
FetchUntil fetches ItemOctet from current scanner position to first occurence of the c or to the end of the underlying data.
lexer.go:67
↓ 1 callersMethodIsChar
IsChar reports whether octet is CHAR.
octet.go:36
↓ 1 callersFunctionNewScanner
NewScanner creates new RFC2616 data scanner.
lexer.go:38
↓ 1 callersFunctionParseRequestLine
ParseRequestLine parses http request line like "GET / HTTP/1.0".
head.go:35
↓ 1 callersFunctionParseResponseLine
ParseResponseLine parses first response line into ResponseLine struct.
head.go:72
↓ 1 callersMethodPeek2
Peek2 reads two first bytes at current position without advancing it. If there not enough data it returs 0.
lexer.go:86
↓ 1 callersFunctionScanPairGreedy
ScanPairGreedy scans for complete pair of opening and closing chars in greedy manner. Note that first opening byte must not be present in data.
lexer.go:253
↓ 1 callersFunctionScanToken
ScanToken scan for next token in p. It returns length of the token and its type. It do not trim p.
lexer.go:338
↓ 1 callersFunctionSkipSpace
SkipSpace skips spaces and lws-sequences from p. It returns number ob bytes skipped.
lexer.go:317
↓ 1 callersFunctionValidCookieName
ValidCookieName reports wheter given bytes is a valid RFC2616 "token" bytes.
cookie.go:170
↓ 1 callersFunctionValidCookieValue
ValidCookieValue reports whether given value is a valid RFC6265 "cookie-octet" bytes. cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E ; U
cookie.go:145
↓ 1 callersMethodfetchOctet
(c byte)
lexer.go:173
↓ 1 callersMethodfetchToken
()
lexer.go:188
↓ 1 callersFunctionisEquality
(b []byte)
httphead.go:329
↓ 1 callersMethodnextChar
()
lexer.go:154
↓ 1 callersFunctionoptionsEqual
(a, b []Option)
httphead_test.go:386
↓ 1 callersFunctionpow
pow for integers implementation. See Donald Knuth, The Art of Computer Programming, Volume 2, Section 4.6.3
head.go:236
↓ 1 callersMethodresult
()
writer.go:99
↓ 1 callersFunctionsplit2
(p []byte, sep byte)
head.go:258
↓ 1 callersFunctionstripQuotes
(bts []byte)
cookie.go:179
↓ 1 callersFunctiontrimLeft
(p []byte)
cookie.go:186
↓ 1 callersFunctiontrimRight
(p []byte)
cookie.go:194
FunctionBenchmarkParameters
(b *testing.B)
httphead_test.go:249
FunctionBenchmarkParseHttpVersion
(b *testing.B)
head_test.go:154
FunctionBenchmarkScanCookie
(b *testing.B)
cookie_test.go:331
FunctionBenchmarkScanTokens
(b *testing.B)
httphead_test.go:109
FunctionBenchmarkScannerReadComment
(b *testing.B)
lexer_test.go:146
FunctionBenchmarkScannerReadString
(b *testing.B)
lexer_test.go:135
FunctionBenchmarkSelectOptions
(b *testing.B)
httphead_test.go:375
FunctionCanonicalizeHeaderKey
CanonicalizeHeaderKey is like standard textproto/CanonicalMIMEHeaderKey, except that it operates with slice of bytes and modifies it inplace without c
head.go:222
MethodClone
Clone is a shorthand for making slice of opt.Size() sequenced with Copy() call.
option.go:30
MethodCopy
Copy copies all underlying []byte slices into dst and returns new Parameters. Note that dst must be at least of p.Size() length.
option.go:101
MethodEqual
Equal reports whether a equal to b.
option.go:68
FunctionExampleParseOptions
()
httphead_test.go:34
FunctionExampleParseOptionsLifetime
()
httphead_test.go:40
FunctionExampleScanOptions
()
httphead_test.go:22
FunctionExampleScanTokens
()
httphead_test.go:10
FunctionExampleWriteOptions
()
writer_test.go:10
MethodForEach
ForEach iterates over parameters key-value pairs and calls cb for each one.
option.go:147
MethodGet
Get returns value by key and flag about existence such value.
option.go:120
MethodLen
()
option.go:191
MethodLess
(a, b int)
option.go:192
FunctionParseHeaderLine
ParseHeaderLine parses HTTP header as key-value pair. It returns parsed values and true if parse is ok.
head.go:180
MethodPeek
Peek reads byte at current position without advancing it. On end of data it returns 0.
lexer.go:77
FunctionReadLine
ReadLine reads line from br. It reads until '\n' and returns bytes without '\n' or '\r\n' at the end. It returns err if and only if line does not end
head.go:147
FunctionScanCookie
ScanCookie scans cookie pairs from data using DefaultCookieScanner.Scan() method.
cookie.go:9
MethodSize
Size returns number of bytes that needed to copy p.
option.go:94
MethodSkip
Skip skips all bytes until first occurence of c.
lexer.go:113
FunctionSplitRequestLine
SplitRequestLine splits given slice of bytes into three chunks without parsing.
head.go:30
FunctionSplitResponseLine
SplitResponseLine splits given slice of bytes into three chunks without parsing.
head.go:67
MethodString
String represetns flag as string.
httphead.go:66
MethodString
String represents parameters as a string.
option.go:156
MethodSwap
(a, b int)
option.go:193
FunctionTestOptionCopy
(t *testing.T)
httphead_test.go:398
FunctionTestParameters
(t *testing.T)
httphead_test.go:215
FunctionTestParseHttpVersion
(t *testing.T)
head_test.go:140
FunctionTestParseRequestLine
(t *testing.T)
head_test.go:8
FunctionTestParseResponseLine
(t *testing.T)
head_test.go:68
FunctionTestScanCookie
(t *testing.T)
cookie_test.go:280
FunctionTestScanTokens
(t *testing.T)
httphead_test.go:85
next →1–100 of 107, ranked by callers