X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Fwebcit.h;h=8604155ec53fcf1b846f1c0ed12d02341d662714;hp=7cbc14e458f6a09e3409a94eba87f085e9e4bb99;hb=6c114e1487e4b4032be88563f0f5b76922edd601;hpb=de6dafd0aac285c563882de551187a6c4217478a diff --git a/webcit/webcit.h b/webcit/webcit.h index 7cbc14e45..8604155ec 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -402,42 +402,51 @@ const char *ReqStrs[eNONE]; #define AUTH_COOKIE 1 #define AUTH_BASIC 2 -typedef struct _ParsedHttpHdrs { - int http_sock; /**< HTTP server socket */ - const char *Pos; - StrBuf *ReadBuf; + +typedef struct _HdrRefs { long eReqType; /**< eGET, ePOST.... */ - const WebcitHandler *Handler; - - int DontNeedAuth; - int got_auth; + int desired_session; int SessionKey; + + int got_auth; + int DontNeedAuth; long ContentLength; time_t if_modified_since; int gzip_ok; /**< Nonzero if Accept-encoding: gzip */ - StrBuf *c_username; - StrBuf *c_password; - StrBuf *c_roomname; - StrBuf *c_language; - StrBuf *RawCookie; - int desired_session; - + /* these are references into Hdr->HTTPHeaders, so we don't need to free them. */ StrBuf *ContentType; - - StrBuf *RawLine;/* TODO: freeme */ + StrBuf *RawCookie; StrBuf *ReqLine; StrBuf *http_host; /**< HTTP Host: header */ StrBuf *browser_host; StrBuf *user_agent; StrBuf *plainauth; + + const WebcitHandler *Handler; +} HdrRefs; + +typedef struct _ParsedHttpHdrs { + int http_sock; /**< HTTP server socket */ + const char *Pos; + StrBuf *ReadBuf; + + + + StrBuf *c_username; + StrBuf *c_password; + StrBuf *c_roomname; + StrBuf *c_language; StrBuf *this_page; /**< URL of current page */ StrBuf *PlainArgs; /*TODO: freeme*/ + HashList *urlstrings; /**< variables passed to webcit in a URL */ HashList *HTTPHeaders; /**< the headers the client sent us */ int nWildfireHeaders; /**< how many wildfire headers did we already send? */ + + HdrRefs HR; } ParsedHttpHdrs;