Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: http_parser/http_parser.c
- Branch:
- tlssocket
- Revision:
- 31:b3730a2c4f39
- Parent:
- 0:910f5949759f
--- a/http_parser/http_parser.c Tue Mar 27 11:07:02 2018 +0200
+++ b/http_parser/http_parser.c Tue Oct 30 10:18:51 2018 +0800
@@ -631,10 +631,10 @@
return s_dead;
}
-size_t http_parser_execute (http_parser *parser,
+uint32_t http_parser_execute (http_parser *parser,
const http_parser_settings *settings,
const char *data,
- size_t len)
+ uint32_t len)
{
char c, ch;
int8_t unhex_val;
@@ -1536,7 +1536,7 @@
{
const char* p_cr;
const char* p_lf;
- size_t limit = data + len - p;
+ uint32_t limit = data + len - p;
limit = MIN(limit, HTTP_MAX_HEADER_SIZE);
@@ -2160,13 +2160,13 @@
const char *
http_errno_name(enum http_errno err) {
- assert(((size_t) err) < ARRAY_SIZE(http_strerror_tab));
+ assert(((uint32_t) err) < ARRAY_SIZE(http_strerror_tab));
return http_strerror_tab[err].name;
}
const char *
http_errno_description(enum http_errno err) {
- assert(((size_t) err) < ARRAY_SIZE(http_strerror_tab));
+ assert(((uint32_t) err) < ARRAY_SIZE(http_strerror_tab));
return http_strerror_tab[err].description;
}
@@ -2257,7 +2257,7 @@
enum http_host_state s;
const char *p;
- size_t buflen = u->field_data[UF_HOST].off + u->field_data[UF_HOST].len;
+ uint32_t buflen = u->field_data[UF_HOST].off + u->field_data[UF_HOST].len;
assert(u->field_set & (1 << UF_HOST));
@@ -2340,7 +2340,7 @@
}
int
-http_parser_parse_url(const char *buf, size_t buflen, int is_connect,
+http_parser_parse_url(const char *buf, uint32_t buflen, int is_connect,
struct http_parser_url *u)
{
enum state s;