44
55#define LLHTTP_VERSION_MAJOR 9
66#define LLHTTP_VERSION_MINOR 1
7- #define LLHTTP_VERSION_PATCH 0
7+ #define LLHTTP_VERSION_PATCH 1
88
99#ifndef INCLUDE_LLHTTP_ITSELF_H_
1010#define INCLUDE_LLHTTP_ITSELF_H_
@@ -809,7 +809,7 @@ void llhttp_set_lenient_keep_alive(llhttp_t* parser, int enabled);
809809 * avoid request smuggling.
810810 * With this flag the extra value will be parsed normally.
811811 *
812- * **Enabling this flag can pose a security issue since you will be exposed to
812+ * **Enabling this flag can pose a security issue since you will be exposed to
813813 * request smuggling attacks. USE WITH CAUTION!**
814814 */
815815LLHTTP_EXPORT
@@ -852,6 +852,19 @@ void llhttp_set_lenient_data_after_close(llhttp_t* parser, int enabled);
852852LLHTTP_EXPORT
853853void llhttp_set_lenient_optional_lf_after_cr (llhttp_t * parser , int enabled );
854854
855+ /*
856+ * Enables/disables lenient handling of line separators.
857+ *
858+ * Normally `llhttp` would error when a LF is not preceded by CR when terminating the
859+ * request line, the status line, the headers, a chunk header or a chunk data.
860+ * With this flag only a LF is required to terminate such sections.
861+ *
862+ * **Enabling this flag can pose a security issue since you will be exposed to
863+ * request smuggling attacks. USE WITH CAUTION!**
864+ */
865+ LLHTTP_EXPORT
866+ void llhttp_set_lenient_optional_cr_before_lf (llhttp_t * parser , int enabled );
867+
855868/* Enables/disables lenient handling of chunks not separated via CRLF.
856869 *
857870 * Normally `llhttp` would error when after a chunk data a CRLF is missing before
@@ -864,6 +877,18 @@ void llhttp_set_lenient_optional_lf_after_cr(llhttp_t* parser, int enabled);
864877LLHTTP_EXPORT
865878void llhttp_set_lenient_optional_crlf_after_chunk (llhttp_t * parser , int enabled );
866879
880+ /* Enables/disables lenient handling of spaces after chunk size.
881+ *
882+ * Normally `llhttp` would error when after a chunk size is followed by one or more
883+ * spaces are present instead of a CRLF or `;`.
884+ * With this flag this check is disabled.
885+ *
886+ * **Enabling this flag can pose a security issue since you will be exposed to
887+ * request smuggling attacks. USE WITH CAUTION!**
888+ */
889+ LLHTTP_EXPORT
890+ void llhttp_set_lenient_spaces_after_chunk_size (llhttp_t * parser , int enabled );
891+
867892#ifdef __cplusplus
868893} /* extern "C" */
869894#endif
0 commit comments