$Id$
+* Strip prepended '/webcit' in requested url's. This may allow us to handle
+ incoming proxy requests from a front end web server.
+* Don't require a session cookie for static content.
+
Thu Nov 10 17:37:32 EST 2005 ajc
* Completed the implementation of a simple drop target for messages. Right
now it just drops to trash. Need to do a folder list drop now.
char httpauth_string[SIZ];
char httpauth_user[SIZ];
char httpauth_pass[SIZ];
+ char *ptr = NULL;
strcpy(httpauth_string, "");
strcpy(httpauth_user, DEFAULT_HTTPAUTH_USER);
} while (strlen(buf) > 0);
+ /*
+ * If the request is prefixed by "/webcit" then chop that off. This
+ * allows a front end web server to forward all /webcit requests to us
+ * while still using the same web server port for other things.
+ */
+
+ ptr = strstr(req->line, " /webcit "); /* Handle "/webcit" */
+ if (ptr != NULL) {
+ strcpy(ptr+2, ptr+8);
+ }
+
+ ptr = strstr(req->line, " /webcit"); /* Handle "/webcit/" */
+ if (ptr != NULL) {
+ strcpy(ptr+1, ptr+8);
+ }
+
+ /* Begin parsing the request. */
+
safestrncpy(buf, req->line, sizeof buf);
lprintf(5, "HTTP: %s\n", buf);
if (is_bogus(buf)) goto bail;
/*
- * If requesting a non-root page, there should already be a cookie
- * set. If there isn't, the client browser has cookies turned off
- * (or doesn't support them) and we have to barf & bail.
+ * Strip out the method, leaving the URL up front...
*/
remove_token(buf, 0, ' ');
if (buf[1]==' ') buf[1]=0;
&& (strncasecmp(buf, "/freebusy", 9))
&& (strncasecmp(buf, "/do_logout", 10))
&& (strncasecmp(buf, "/groupdav", 9))
+ && (strncasecmp(buf, "/static", 7))
&& (strncasecmp(buf, "/rss", 4))
&& (got_cookie == 0)) {
strcpy(req->line, "GET /static/nocookies.html"