|
2 | 2 | #define INCLUDE_LLHTTP_H_ |
3 | 3 |
|
4 | 4 | #define LLHTTP_VERSION_MAJOR 1 |
5 | | -#define LLHTTP_VERSION_MINOR 0 |
| 5 | +#define LLHTTP_VERSION_MINOR 1 |
6 | 6 | #define LLHTTP_VERSION_PATCH 1 |
7 | 7 |
|
8 | 8 | #ifndef INCLUDE_LLHTTP_ITSELF_H_ |
@@ -215,6 +215,7 @@ typedef enum llhttp_method llhttp_method_t; |
215 | 215 | #ifdef __cplusplus |
216 | 216 | extern "C" { |
217 | 217 | #endif |
| 218 | +#include <stddef.h> |
218 | 219 |
|
219 | 220 | typedef llhttp__internal_t llhttp_t; |
220 | 221 | typedef struct llhttp_settings_s llhttp_settings_t; |
@@ -273,6 +274,10 @@ void llhttp_settings_init(llhttp_settings_t* settings); |
273 | 274 | * In a special case of CONNECT/Upgrade request/response `HPE_PAUSED_UPGRADE` |
274 | 275 | * is returned after fully parsing the request/response. If the user wishes to |
275 | 276 | * continue parsing, they need to invoke `llhttp_resume_after_upgrade()`. |
| 277 | + * |
| 278 | + * NOTE: if this function ever returns a non-pause type error, it will continue |
| 279 | + * to return the same error upon each successive call up until `llhttp_init()` |
| 280 | + * call. |
276 | 281 | */ |
277 | 282 | llhttp_errno_t llhttp_execute(llhttp_t* parser, const char* data, size_t len); |
278 | 283 |
|
@@ -345,6 +350,9 @@ const char* llhttp_get_error_pos(const llhttp_t* parser); |
345 | 350 | /* Returns textual name of error code */ |
346 | 351 | const char* llhttp_errno_name(llhttp_errno_t err); |
347 | 352 |
|
| 353 | +/* Returns textual name of HTTP method */ |
| 354 | +const char* llhttp_method_name(llhttp_method_t method); |
| 355 | + |
348 | 356 | #ifdef __cplusplus |
349 | 357 | } /* extern "C" */ |
350 | 358 | #endif |
|
0 commit comments