Lines Matching refs:parser
7 #include "http-parser.h"
32 http_parse_token68(struct http_parser *parser, const char **token68_r)
41 if (parser->cur >= parser->end || !http_char_is_token68(*parser->cur))
43 first = parser->cur++;
44 while (parser->cur < parser->end && http_char_is_token68(*parser->cur))
45 parser->cur++;
48 while (parser->cur < parser->end && *parser->cur == '=')
49 parser->cur++;
51 *token68_r = t_strndup(first, parser->cur - first);
56 http_parse_auth_param(struct http_parser *parser,
59 const unsigned char *first = parser->cur, *end_token;
65 if ((ret=http_parser_skip_token(parser)) <= 0) {
66 parser->cur = first;
69 end_token = parser->cur;
72 http_parse_ows(parser);
73 if (parser->cur >= parser->end || *parser->cur != '=') {
74 parser->cur = first;
77 parser->cur++;
78 http_parse_ows(parser);
81 if ((ret=http_parse_token_or_qstring(parser, value_r)) <= 0) {
82 parser->cur = first;
91 http_parse_auth_params(struct http_parser *parser,
94 const unsigned char *last = parser->cur;
101 (parser, ¶m.name, ¶m.value)) > 0) {
107 last = parser->cur;
113 http_parse_ows(parser);
114 if (parser->cur >= parser->end || *parser->cur != ',')
116 parser->cur++;
120 parser->cur = last;
129 struct http_parser parser;
132 http_parser_init(&parser, data, size);
143 if (parser.cur >= parser.end || *parser.cur != ',')
145 parser.cur++;
146 http_parse_ows(&parser);
155 if ((ret=http_parse_token(&parser, &chlng.scheme)) <= 0) {
162 if (parser.cur >= parser.end || *parser.cur != ' ')
164 parser.cur++;
165 while (parser.cur < parser.end && *parser.cur == ' ')
166 parser.cur++;
169 if ((ret=http_parse_auth_params(&parser, &chlng.params)) <= 0) {
172 if (http_parse_token68(&parser, &chlng.data) < 0)
184 http_parse_ows(&parser);
185 if (parser.cur >= parser.end || *parser.cur != ',')
187 parser.cur++;
191 if (parser.cur != parser.end)
199 struct http_parser parser;
202 http_parser_init(&parser, data, size);
214 if (http_parse_token(&parser, &crdts->scheme) <= 0)
218 if (parser.cur >= parser.end || *parser.cur != ' ')
220 parser.cur++;
221 while (parser.cur < parser.end && *parser.cur == ' ')
222 parser.cur++;
225 if ((ret=http_parse_auth_params(&parser, &crdts->params)) <= 0) {
228 if (http_parse_token68(&parser, &crdts->data) < 0)
232 if (parser.cur != parser.end)