summaryrefslogtreecommitdiffstats
path: root/third-party/llhttp/src/api.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--third-party/llhttp/src/api.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/third-party/llhttp/src/api.c b/third-party/llhttp/src/api.c
index e0d0385..8c2ce3d 100644
--- a/third-party/llhttp/src/api.c
+++ b/third-party/llhttp/src/api.c
@@ -126,7 +126,7 @@ void llhttp_reset(llhttp_t* parser) {
llhttp_type_t type = parser->type;
const llhttp_settings_t* settings = parser->settings;
void* data = parser->data;
- uint8_t lenient_flags = parser->lenient_flags;
+ uint16_t lenient_flags = parser->lenient_flags;
llhttp__internal_init(parser);
@@ -315,6 +315,22 @@ void llhttp_set_lenient_optional_crlf_after_chunk(llhttp_t* parser, int enabled)
}
}
+void llhttp_set_lenient_optional_cr_before_lf(llhttp_t* parser, int enabled) {
+ if (enabled) {
+ parser->lenient_flags |= LENIENT_OPTIONAL_CR_BEFORE_LF;
+ } else {
+ parser->lenient_flags &= ~LENIENT_OPTIONAL_CR_BEFORE_LF;
+ }
+}
+
+void llhttp_set_lenient_spaces_after_chunk_size(llhttp_t* parser, int enabled) {
+ if (enabled) {
+ parser->lenient_flags |= LENIENT_SPACES_AFTER_CHUNK_SIZE;
+ } else {
+ parser->lenient_flags &= ~LENIENT_SPACES_AFTER_CHUNK_SIZE;
+ }
+}
+
/* Callbacks */