don't set the Expires header on any page generated from a POST. This
authorAndrew Tridgell <tridge@samba.org>
Wed, 18 Mar 1998 07:51:57 +0000 (07:51 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 18 Mar 1998 07:51:57 +0000 (07:51 +0000)
stops the "POST data has expired" problem when using the back button
in netscape.

source/web/swat.c

index ae5a8006ce804ef770988c9d8348a23009174cdb..6d155d88042b3755b42c9bc1492bcd7c3ae01991 100644 (file)
@@ -42,7 +42,9 @@ struct current_user current_user;
 /* start the page with standard stuff */
 static void print_header(void)
 {
-       printf("Expires: 0\r\n");
+       if (!cgi_waspost()) {
+               printf("Expires: 0\r\n");
+       }
        printf("Content-type: text/html\r\n\r\n");
        printf("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">\n");
        printf("<HTML>\n<HEAD>\n<TITLE>Samba Web Administration Tool</TITLE>\n</HEAD>\n<BODY background=\"%simages/background.jpg\">\n\n", cgi_rooturl());