aboutsummaryrefslogtreecommitdiff
path: root/src/http_Content.h
diff options
context:
space:
mode:
authorswhite <swhite@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2004-04-06 17:45:14 +0000
committerswhite <swhite@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2004-04-06 17:45:14 +0000
commit89b88d27b20641e04cd1c2714c299d8908822b54 (patch)
tree5b31770e8864f4d6f0953acbe24af5cc80d43730 /src/http_Content.h
parent3ccc27cd1bf0912054213a88798b088010173f1e (diff)
Regarding Cactus bug report 1632 "HTTPD contains buffer overflows"
1) Got rid of most strcat/sprintf into automatic array, replaced with a String module that allocates dynamic memory on the heap. 2) Went a long way toward initializing all variables. 3) Tested: Ran two copies with same parfile except different port, one with my changes, one with original. Went through different kinds of pages by hand, checked by eye. 4) Tried to make HTML XHTML 1.0-compliant. Checked with Amaya. One problem: How to deal with raw less-than characters, etc. Made a function to convert them to HTML Character Entities, but isn't clear this will work properly in the forms. So I left these symbols in the forms. 5) Also checked with more primitive browsers, lynx and dillo. 6) Marked a few instances of questionable code with 'SW' To do ----- Document a few new functions, esp. in Content.c git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@187 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src/http_Content.h')
-rw-r--r--src/http_Content.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/http_Content.h b/src/http_Content.h
index 40c2777..bfac5d7 100644
--- a/src/http_Content.h
+++ b/src/http_Content.h
@@ -13,6 +13,11 @@
#define HTTP_QUICKLINK 1
+#define STRING_NAMESPACE 1
+#include "SString.h"
+
+#define EMPTYSTRING {'\0'}
+
#ifdef __cplusplus
extern "C"
{
@@ -26,8 +31,11 @@ int HTTP_ContentLink(const char *URL,
int HTTP_ContentSendFromFile(httpRequest *request,
int filedes);
-int HTTP_ContentHeader(const cGH *cctkGH, int choice, int len, char *mess, char *menu);
-int HTTP_ContentFooter(const cGH *cctkGH, int choice, int len, char *mess);
+int SetHTML_ContentHeader(const cGH *cctkGH, int choice, String *mess,
+ const String *menu);
+int SetHTML_ContentFooter(const cGH *cctkGH, int choice, String *mess);
+
+void SendHTTP_OK_Header(httpRequest *request);
#ifdef __cplusplus
}