* Don't call whobbs() directly after changing masq room/host, it screws up the
authorArt Cancro <ajc@citadel.org>
Thu, 18 May 2000 02:33:39 +0000 (02:33 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 18 May 2000 02:33:39 +0000 (02:33 +0000)
  refresh.  It now calls an HTTP redirect page instead.
* added http_redirect(char *url) function to accomplish the above

webcit/ChangeLog
webcit/webcit.c
webcit/webcit.h
webcit/who.c

index 4916c5aa5087628ab761afaccf94087bbe174285..e881d9c7800c31cf00ebcff7a3be1b3caab6a4ea 100644 (file)
@@ -1,4 +1,9 @@
 $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)
@@ -439,3 +444,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index e94bd49695ca83fc0b08b29cc735489b98e5426b..4363e642a396ec5734b98c38ffa131a90010d304 100644 (file)
@@ -369,6 +369,21 @@ void output_headers(int controlcode)
 }
 
 
+/*
+ *
+ */
+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()
 {
index 3e77ef36d6cfd2528d2a5f21da0753895f6694c2..84904bc0342fd6572a8d739b2c0b4e45417f400a 100644 (file)
@@ -259,3 +259,4 @@ void fmt_date(char *buf, time_t thetime);
 void httpdate(char *buf, time_t thetime);
 void end_webcit_session(void);
 void page_popup(void);
+void http_redirect(char *);
index 8fa8ed8ff916d848b1c3e162abc53e841889c05b..39897d7d083bf9f30241433ca43c2e4255dea04f 100644 (file)
@@ -160,7 +160,6 @@ void terminate_session(void)
 }
 
 
-
 /*
  * Change your session info (fake roomname and hostname)
  */
@@ -171,17 +170,17 @@ void edit_me(void)
        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);