aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/internal.h
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-30 21:54:09 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-31 11:45:36 +0300
commit9039d65241daf512e7756319cd64d3d54750cb22 (patch)
tree9c109e217ad1014a89de5495fcebdc1723672e31 /src/microhttpd/internal.h
parentc15077e312ffe934b242c7ecc6559c6eb4eb62cb (diff)
downloadlibmicrohttpd-9039d65241daf512e7756319cd64d3d54750cb22.tar.gz
libmicrohttpd-9039d65241daf512e7756319cd64d3d54750cb22.zip
authentication: reworked header parsing
Added single function to parse all enabled authentication schemes header strings. The parsing result is cached and reused thus avoiding repetitive header parsing. The new function correctly "unquotes" values (backslashes are removed) as required by RFC.
Diffstat (limited to 'src/microhttpd/internal.h')
-rw-r--r--src/microhttpd/internal.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 3dafe866..f6452b2c 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -778,6 +778,8 @@ typedef ssize_t
778 size_t max_bytes); 778 size_t max_bytes);
779 779
780 780
781struct MHD_AuthRqHeader; /* Forward declaration only */
782
781/** 783/**
782 * Ability to use same connection for next request 784 * Ability to use same connection for next request
783 */ 785 */
@@ -1034,6 +1036,15 @@ struct MHD_Connection
1034 */ 1036 */
1035 enum MHD_HTTP_Version http_ver; 1037 enum MHD_HTTP_Version http_ver;
1036 1038
1039#if defined(BAUTH_SUPPORT) || defined(DAUTH_SUPPORT)
1040 /**
1041 * Pointer to request authorization structure.
1042 * Allocated in pool.
1043 */
1044 const struct MHD_AuthRqHeader *rq_auth;
1045#endif
1046
1047
1037 /** 1048 /**
1038 * Close connection after sending response? 1049 * Close connection after sending response?
1039 * Functions may change value from "Unknown" or "KeepAlive" to "Must close", 1050 * Functions may change value from "Unknown" or "KeepAlive" to "Must close",