refresh. It now calls an HTTP redirect page instead.
* added http_redirect(char *url) function to accomplish the above
$Log$
+Revision 211.19 2000/05/18 02:33:39 ajc
+* Don't call whobbs() directly after changing masq room/host, it screws up the
+ refresh. It now calls an HTTP redirect page instead.
+* added http_redirect(char *url) function to accomplish the above
+
Revision 211.18 2000/05/08 17:24:32 ajc
* Removed HTTP date fields because it was confusing browser caches (weird)
* Moved express messages to a pop-up HTML window (as opposed to a dialog box)
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
+
}
+/*
+ *
+ */
+void http_redirect(char *whichpage) {
+ wprintf("HTTP/1.0 302 Moved Temporarily\n");
+ wprintf("Location: %s\n", whichpage);
+ wprintf("URI: %s\n", whichpage);
+ wprintf("Content-type: text/html\n\n");
+ wprintf("<html><body>\n");
+ wprintf("you really want to be <A HREF=\"%s\">here</A> now\n",
+ whichpage);
+ wprintf("</body></html>\n");
+}
+
+
void check_for_express_messages()
{
void httpdate(char *buf, time_t thetime);
void end_webcit_session(void);
void page_popup(void);
+void http_redirect(char *);
}
-
/*
* Change your session info (fake roomname and hostname)
*/
if (!strcasecmp(bstr("sc"), "Change room name")) {
serv_printf("RCHG %s", bstr("fake_roomname"));
serv_gets(buf);
- whobbs();
+ http_redirect("/whobbs");
} else if (!strcasecmp(bstr("sc"), "Change host name")) {
serv_printf("HCHG %s", bstr("fake_hostname"));
serv_gets(buf);
- whobbs();
+ http_redirect("/whobbs");
} else if (!strcasecmp(bstr("sc"), "Change user name")) {
serv_printf("UCHG %s", bstr("fake_username"));
serv_gets(buf);
- whobbs();
+ http_redirect("/whobbs");
} else if (!strcasecmp(bstr("sc"), "Cancel")) {
- whobbs();
+ http_redirect("/whobbs");
} else {
output_headers(3);