HTTP and HTTPS library for Mbed OS 5

Dependents:   RZ_A2M_Mbed_samples_20201012 RZ_A2M_Mbed_samples

Branch:
tlssocket
Revision:
31:b3730a2c4f39
Parent:
2:959baaa89148
Child:
32:fa4d71265625
--- a/http_parser/http_parser.h	Tue Mar 27 11:07:02 2018 +0200
+++ b/http_parser/http_parser.h	Tue Oct 30 10:18:51 2018 +0800
@@ -20,6 +20,7 @@
  */
 #ifndef http_parser_h
 #define http_parser_h
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -29,8 +30,6 @@
 #define HTTP_PARSER_VERSION_MINOR 7
 #define HTTP_PARSER_VERSION_PATCH 1
 
-typedef unsigned int size_t;
-
 #if defined(_WIN32) && !defined(__MINGW32__) && \
   (!defined(_MSC_VER) || _MSC_VER<1600) && !defined(__WINE__)
 #include <BaseTsd.h>
@@ -87,7 +86,7 @@
  * many times for each string. E.G. you might get 10 callbacks for "on_url"
  * each providing just a few characters more data.
  */
-typedef int (*http_data_cb) (http_parser*, const char *at, size_t length);
+typedef int (*http_data_cb) (http_parser*, const char *at, uint32_t length);
 typedef int (*http_cb) (http_parser*);
 
 
@@ -390,10 +389,10 @@
 
 /* Executes the parser. Returns number of parsed bytes. Sets
  * `parser->http_errno` on error. */
-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);
 
 
 /* If http_should_keep_alive() in the on_headers_complete or
@@ -417,7 +416,7 @@
 void http_parser_url_init(struct http_parser_url *u);
 
 /* Parse a URL; return nonzero on failure */
-int http_parser_parse_url(const char *buf, size_t buflen,
+int http_parser_parse_url(const char *buf, uint32_t buflen,
                           int is_connect,
                           struct http_parser_url *u);