aboutsummaryrefslogtreecommitdiff
path: root/src/Content.c
diff options
context:
space:
mode:
authorgoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2001-05-18 09:35:49 +0000
committergoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2001-05-18 09:35:49 +0000
commitd8f1697495666e3a90f1a6e438ad7111469e2f6a (patch)
tree7cfa1a8a4b76a9602aed683fbe087597def3aaa0 /src/Content.c
parent8b12a1b456d296db9c305a1f008dbf93f515301c (diff)
Moving John's redirection stuff into a file of its own as it is a logically
independent system. All files except Startup.c and make.code.defn should be pretty much back at their beta10 state if you're trying to track this change back in time. Redirect stuff is now in Redirect.c and http_Redirect.h. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@129 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src/Content.c')
-rw-r--r--src/Content.c89
1 files changed, 0 insertions, 89 deletions
diff --git a/src/Content.c b/src/Content.c
index 2f2ffba..517202f 100644
--- a/src/Content.c
+++ b/src/Content.c
@@ -69,7 +69,6 @@ struct httpLink
static int RegisterImages(void);
-static int RedirectPage(cGH *cctkGH, httpRequest *request, void *data);
static int MainPage(cGH *cctkGH, httpRequest *request, void *data);
static int AboutPage(cGH *cctkGH, httpRequest *request, void *data);
@@ -88,7 +87,6 @@ static int CookieTestPage(cGH *cctkGH, httpRequest *request, void *data);
********************************************************************/
void HTTP_ContentWork(cGH *GH);
-int HTTP_RegisterRedirect(void);
int HTTP_RegisterPages(void);
int HTTPi_RegisterGroupsPages(void);
int HTTPi_RegisterThornPages(void);
@@ -193,29 +191,6 @@ int HTTP_RegisterPages(void)
}
/*@@
- @routine HTTP_RegisterRedirect
- @date Fri April 20 23:47:43 2001
- @author John Shalf
- @desc
- Redirection Page Registration.
- @enddesc
- @calls
- @calledby
- @history
-
- @endhistory
-
-@@*/
-int HTTP_RegisterRedirect(void){
- DECLARE_CCTK_PARAMETERS
-#ifdef HTTP_DEBUG
- printf("Registering Redirection Page");
-#endif
- HTTP_RegisterPage("/index.html",RedirectPage,NULL);
- RegisterImages();
-}
-
- /*@@
@routine HTTP_ContentLink
@date Sun Sep 17 13:17:56 2000
@author Tom Goodale
@@ -302,70 +277,6 @@ static int CompareStrings(const void *string1, const void *string2)
/*@@
- @routine RedirectPage
- @date Fri April 20 23:47:43 2001
- @author John Shalf
- @desc
- Redirects the webbrowser to the main server page
- @enddesc
- @calls
- @calledby
- @history
- @hdate Thu Sep 14 10:54:22 2000 @hauthor John Shalf
- @hdesc For clusters where its difficult to know which node is going to
- have the webserver process, this opens a port on *all* distinct nodes
- and redirects all web connection attempts to the root node for processing.
- @endhistory
-
-@@*/
-
-static int RedirectPage(cGH *cctkGH, httpRequest *request, void *data)
-{
-
- DECLARE_CCTK_PARAMETERS
-
- int retval;
- char message[10098];
- char title[4098];
- char menu[4098];
- char *dir;
- char *file;
- struct httpLink *hlink;
-
- /* avoid compiler warning about unused parameter */
- data = data;
-
- /* Status message */
- strcpy(message,"HTTP/1.0 200 OK\r\n");
-
- HTTP_Write(request, message, strlen(message));
-
- /* Content-Type */
- strcpy(message,"Content-Type: text/html\r\n\r\n");
-
- HTTP_Write(request, message, strlen(message));
-
- /* Start the page */
- strcpy(message,"<HTML><HEAD><TITLE>Server Redirect</TITLE>\n");
- /* Write out the main header part */
- HTTP_Write(request, message, strlen(message));
- sprintf(message,"<META http-equiv=\"refresh\" content=\"1; URL=http://%s:%u\"></HEAD><body>\n",
- HTTP_Master(),HTTP_Port());
- HTTP_Write(request,message,strlen(message));
- /* ********** Server Redirect To Master ************* */
- sprintf(message,"<p><h1>Redirect to master host=%s:%u</h1><p>\n",
- HTTP_Master(),HTTP_Port());
- HTTP_Write(request,message,strlen(message));
-
- HTTP_ContentFooter(cctkGH, 0, 4096, message);
- retval = HTTP_Write(request, message, strlen(message));
-
- /* retval = HTTP_Write(request, base_page, strlen(base_page)); */
-
- return retval;
-}
-
- /*@@
@routine MainPage
@date Wed Sep 13 23:47:43 2000
@author Tom Goodale