} addrbookent;
-
-
#define AJAX (1<<0)
#define ANONYMOUS (1<<1)
#define NEED_URL (1<<2)
typedef struct _WebcitHandler{
WebcitHandlerFunc F;
long Flags;
+ StrBuf *Name;
} WebcitHandler;
void WebcitAddUrlHandler(const char * UrlString, long UrlSLen, WebcitHandlerFunc F, long Flags);
-
-
-
-
-
-
typedef struct _headereval {
ExamineMsgHeaderFunc evaluator;
int Type;
};
const char *ReqStrs[eNONE];
-
+#define NO_AUTH 0
+#define AUTH_COOKIE 1
+#define AUTH_BASIC 2
typedef struct _ParsedHttpHdrs {
int http_sock; /**< HTTP server socket */
const WebcitHandler *Handler;
int DontNeedAuth;
- int got_cookie;
+ int got_auth;
+ int SessionKey;
long ContentLength;
time_t if_modified_since;
int gzip_ok; /**< Nonzero if Accept-encoding: gzip */
StrBuf *http_host; /**< HTTP Host: header */
StrBuf *browser_host;
StrBuf *user_agent;
+ StrBuf *plainauth;
StrBuf *this_page; /**< URL of current page */
StrBuf *PlainArgs; /*TODO: freeme*/
int is_mobile; /**< Client is a handheld browser */
int ctdl_pid; /**< Session ID on the Citadel server */
int nonce; /**< session nonce (to prevent session riding) */
+ int SessionKey;
/* Session local Members */
int serv_sock; /**< Client socket to Citadel server */
/* accounting */
StrBuf *wc_username; /**< login name of current user */
- StrBuf *httpauth_user; /**< only for GroupDAV sessions */
StrBuf *wc_fullname; /**< Screen name of current user */
StrBuf *wc_password; /**< Password of current user */
StrBuf *httpauth_pass; /**< only for GroupDAV sessions */
int HaveEvaluator;
} OneHttpHeader;
+void RegisterHeaderHandler(const char *Name, long Len, Header_Evaluator F);
/* values for WC->current_iconbar */
void confirm_delete_msg(void);
void display_success(char *);
void authorization_required(const char *message);
-int ReEstablish_Session(void);
-
+void CheckAuthBasic(ParsedHttpHdrs *hdr);
+void GetAuthBasic(ParsedHttpHdrs *hdr);
void server_to_text(void);
void save_edit(char *description, char *enter_cmd, int regoto);
void display_edit(char *description, char *check_cmd,
long unescape_input(char *buf);
void do_selected_iconbar(void);
void spawn_another_worker_thread(void);
-void display_rss(const StrBuf *roomname);
void StrEndTab(StrBuf *Target, int tabnum, int num_tabs);
void StrBeginTab(StrBuf *Target, int tabnum, int num_tabs);
void StrTabbedDialog(StrBuf *Target, int num_tabs, StrBuf *tabnames[]);