mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-09 16:21:45 +00:00
More unit test for parse_http_header()
This commit is contained in:
1 parent
39fd804aeb
commit
0b4676b711
1 file changed
+4
-1
+4
-1
@@ -674,7 +674,8 @@ static int mg_snprintf(struct mg_connection *conn, char *buf, size_t buflen,
|
|||||||
// 0-terminate resulting word. Skip the delimiter and following whitespaces if any.
|
// 0-terminate resulting word. Skip the delimiter and following whitespaces if any.
|
||||||
// Advance pointer to buffer to the next word. Return found 0-terminated word.
|
// Advance pointer to buffer to the next word. Return found 0-terminated word.
|
||||||
// Delimiters can be quoted with quotechar.
|
// Delimiters can be quoted with quotechar.
|
||||||
static char *skip_quoted(char **buf, const char *delimiters, const char *whitespace, char quotechar) {
|
static char *skip_quoted(char **buf, const char *delimiters,
|
||||||
|
const char *whitespace, char quotechar) {
|
||||||
char *p, *begin_word, *end_word, *end_whitespace;
|
char *p, *begin_word, *end_word, *end_whitespace;
|
||||||
|
|
||||||
begin_word = *buf;
|
begin_word = *buf;
|
||||||
@@ -2619,6 +2620,8 @@ static int is_valid_http_method(const char *method) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse HTTP request, fill in mg_request_info structure.
|
// Parse HTTP request, fill in mg_request_info structure.
|
||||||
|
// This function modifies the buffer with HTTP request by nul-terminating
|
||||||
|
// HTTP request components, header names and header values.
|
||||||
static int parse_http_request(char *buf, struct mg_request_info *ri) {
|
static int parse_http_request(char *buf, struct mg_request_info *ri) {
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user