summaryrefslogtreecommitdiff
path: root/include/httpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/httpd.h')
-rw-r--r--include/httpd.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/httpd.h b/include/httpd.h
index 5aa8a02e35..bad2c316ab 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -1414,6 +1414,28 @@ AP_DECLARE(char *) ap_get_list_item(apr_pool_t *p, const char **field);
*/
AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *tok);
+/* Scan a string for field content chars, as defined by RFC7230 section 3.2
+ * including VCHAR/obs-text, as well as HT and SP
+ * @param ptr The string to scan
+ * @return A pointer to the first (non-HT) ASCII ctrl character.
+ * @note lws and trailing whitespace are scanned, the caller is responsible
+ * for trimming leading and trailing whitespace
+ */
+AP_DECLARE(const char *) ap_scan_http_field_content(const char *ptr);
+
+/* Scan a string for token characters, as defined by RFC7230 section 3.2.6
+ * @param ptr The string to scan
+ * @return A pointer to the first non-token character.
+ */
+AP_DECLARE(const char *) ap_scan_http_token(const char *ptr);
+
+/* Scan a string for visible ASCII (0x21-0x7E) or obstext (0x80+)
+ * and return a pointer to the first SP/CTL/NUL character encountered.
+ * @param ptr The string to scan
+ * @return A pointer to the first SP/CTL character.
+ */
+AP_DECLARE(const char *) ap_scan_vchar_obstext(const char *ptr);
+
/**
* Retrieve a token, spacing over it and adjusting the pointer to
* the first non-white byte afterwards. Note that these tokens