US_NOPROMPT | US_DISAPPEAR | US_PAGINATOR | \
US_FLOORS | US_COLOR | US_PROMPTCTL )
+
+#define MAJORCODE(a) (((int)(a / 100) ) * 100)
+
+#define LISTING_FOLLOWS 100
+#define CIT_OK 200
+#define MORE_DATA 300
+#define SEND_LISTING 400
+#define ERROR 500
+#define BINARY_FOLLOWS 600
+#define SEND_BINARY 700
+#define START_CHAT_MODE 800
+#define ASYNC_MSG 900
+
+#define MINORCODE(a) (a % 100)
+#define ASYNC_GEXP 02
+#define INTERNAL_ERROR 10
+#define TOO_BIG 11
+#define ILLEGAL_VALUE 12
+#define NOT_LOGGED_IN 20
+#define CMD_NOT_SUPPORTED 30
+#define SERVER_SHUTTING_DOWN 31
+#define PASSWORD_REQUIRED 40
+#define ALREADY_LOGGED_IN 41
+#define USERNAME_REQUIRED 42
+#define HIGHER_ACCESS_REQUIRED 50
+#define MAX_SESSIONS_EXCEEDED 51
+#define RESOURCE_BUSY 52
+#define RESOURCE_NOT_OPEN 53
+#define NOT_HERE 60
+#define INVALID_FLOOR_OPERATION 61
+#define NO_SUCH_USER 70
+#define FILE_NOT_FOUND 71
+#define ROOM_NOT_FOUND 72
+#define NO_SUCH_SYSTEM 73
+#define ALREADY_EXISTS 74
+#define MESSAGE_NOT_FOUND 75
/*
* NLI is the string that shows up in a who's online listing for sessions
* that are active, but for which no user has yet authenticated.
eNone
};
+enum {
+ eGET,
+ ePOST,
+ eOPTIONS,
+ ePROPFIND,
+ ePUT,
+ eDELETE,
+ eHEAD,
+ eMOVE,
+ eCOPY,
+ eNONE
+};
+const char *ReqStrs[eNONE];
/*
* One of these is kept for each active Citadel session.
* HTTP transactions are bound to one at a time.
time_t lastreq; /**< Timestamp of most recent HTTP */
time_t last_pager_check; /**< last time we polled for instant msgs */
ServInfo *serv_info; /**< Iformation about the citserver we're connected to */
+
/* Request local Members */
+ long eReqType; /**< eGET, ePOST.... */
StrBuf *CLineBuf; /**< linebuffering client stuff */
StrBuf *UrlFragment1; /**< first urlfragment, if NEED_URL is specified by the handler*/
StrBuf *UrlFragment2; /**< second urlfragment, if NEED_URL is specified by the handler*/
StrBuf *this_page; /**< URL of current page */
HashList *urlstrings; /**< variables passed to webcit in a URL */
HashList *vars; /**< HTTP variable substitutions for this page */
+ HashList *headers; /**< the headers the client sent us */
StrBuf *http_host; /**< HTTP Host: header */
int is_ajax; /** < are we doing an ajax request? */
int gzip_ok; /**< Nonzero if Accept-encoding: gzip */
extern char wizard_filename[];
extern time_t if_modified_since;
extern int follow_xff;
-extern HashList *HandlerHash;
-extern HashList *PreferenceHooks;
-extern HashList *ZoneHash;
-extern HashList *SortHash;
void InitialiseSemaphores(void);
void begin_critical_section(int which_one);
void do_housekeeping(void);
void smart_goto(const StrBuf *);
void worker_entry(void);
-void session_loop(HashList *HTTPHeaders,
- StrBuf *ReqLine,
- StrBuf *ReqType,
+void session_loop(StrBuf *ReqLine,
StrBuf *ReadBuf,
const char **Pos);
size_t wc_strftime(char *s, size_t max, const char *format, const struct tm *tm);
long unescape_input(char *buf);
void do_selected_iconbar(void);
void spawn_another_worker_thread(void);
-void display_rss(const StrBuf *roomname, StrBuf *request_method);
+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[]);
#define AJAX (1<<0)
#define ANONYMOUS (1<<1)
#define NEED_URL (1<<2)
+#define XHTTP_COMMANDS (1<<3)
/* These should be empty, but we have them for testing */