Index: libhttpd/protocol.c
===================================================================
--- libhttpd/protocol.c	(revision 1343)
+++ libhttpd/protocol.c	(working copy)
@@ -688,10 +688,10 @@
 
 
 char *_httpd_escape(str)
-        char *str;
+        const char *str;
 {
     unsigned char mask = URL_XPALPHAS;
-    char * p;
+    const char * p;
     char * q;
     char * result;
     int unacceptable = 0;
Index: libhttpd/httpd.h
===================================================================
--- libhttpd/httpd.h	(revision 1343)
+++ libhttpd/httpd.h	(working copy)
@@ -196,38 +196,38 @@
 int httpdAddStaticContent __ANSI_PROTO((httpd*,char*,char*,int,int(*)(),char*));
 int httpdAddWildcardContent __ANSI_PROTO((httpd*,char*,int(*)(),char*));
 int httpdAddCWildcardContent __ANSI_PROTO((httpd*,char*,int(*)(),void(*)()));
-int httpdAddVariable __ANSI_PROTO((request*, char*, char*));
+int httpdAddVariable __ANSI_PROTO((request*, const char*, const char*));
 request *httpdGetConnection __ANSI_PROTO((httpd*, struct timeval*));
 int httpdReadRequest __ANSI_PROTO((httpd*, request*));
 int httpdCheckAcl __ANSI_PROTO((httpd*, request *, httpAcl*));
 int httpdAddC404Content __ANSI_PROTO((httpd*,void(*)()));
 
 char *httpdRequestMethodName __ANSI_PROTO((request*));
-char *httpdUrlEncode __ANSI_PROTO((char *));
+char *httpdUrlEncode __ANSI_PROTO((const char *));
 
-void httpdAddHeader __ANSI_PROTO((request*, char*));
-void httpdSetContentType __ANSI_PROTO((request*, char*));
-void httpdSetResponse __ANSI_PROTO((request*, char*));
+void httpdAddHeader __ANSI_PROTO((request*, const char*));
+void httpdSetContentType __ANSI_PROTO((request*, const char*));
+void httpdSetResponse __ANSI_PROTO((request*, const char*));
 void httpdEndRequest __ANSI_PROTO((request*));
 
 httpd *httpdCreate __ANSI_PROTO(());
 void httpdFreeVariables __ANSI_PROTO((request*));
 void httpdDumpVariables __ANSI_PROTO((request*));
-void httpdOutput __ANSI_PROTO((request*, char*));
-void httpdPrintf __ANSI_PROTO((request*, char*, ...));
+void httpdOutput __ANSI_PROTO((request*, const char*));
+void httpdPrintf __ANSI_PROTO((request*, const char*, ...));
 void httpdProcessRequest __ANSI_PROTO((httpd*, request *));
 void httpdSendHeaders __ANSI_PROTO((request*));
-void httpdSetFileBase __ANSI_PROTO((httpd*, char*));
-void httpdSetCookie __ANSI_PROTO((request*, char*, char*));
+void httpdSetFileBase __ANSI_PROTO((httpd*, const char*));
+void httpdSetCookie __ANSI_PROTO((request*, const char*, const char*));
 
 void httpdSetErrorLog __ANSI_PROTO((httpd*, FILE*));
 void httpdSetAccessLog __ANSI_PROTO((httpd*, FILE*));
 void httpdSetDefaultAcl __ANSI_PROTO((httpd*, httpAcl*));
 
-httpVar	*httpdGetVariableByName __ANSI_PROTO((request*, char*));
-httpVar	*httpdGetVariableByPrefix __ANSI_PROTO((request*, char*));
-httpVar	*httpdGetVariableByPrefixedName __ANSI_PROTO((request*, char*, char*));
-httpVar *httpdGetNextVariableByPrefix __ANSI_PROTO((httpVar*, char*));
+httpVar	*httpdGetVariableByName __ANSI_PROTO((request*, const char*));
+httpVar	*httpdGetVariableByPrefix __ANSI_PROTO((request*, const char*));
+httpVar	*httpdGetVariableByPrefixedName __ANSI_PROTO((request*, const char*, const char*));
+httpVar *httpdGetNextVariableByPrefix __ANSI_PROTO((httpVar*, const char*));
 
 httpAcl *httpdAddAcl __ANSI_PROTO((httpd*, httpAcl*, char*, int));
 
Index: libhttpd/httpd_priv.h
===================================================================
--- libhttpd/httpd_priv.h	(revision 1343)
+++ libhttpd/httpd_priv.h	(working copy)
@@ -49,7 +49,7 @@
 #define LEVEL_ERROR	"error"
 
 char * _httpd_unescape __ANSI_PROTO((char*));
-char *_httpd_escape __ANSI_PROTO((char*));
+char *_httpd_escape __ANSI_PROTO((const char*));
 char _httpd_from_hex  __ANSI_PROTO((char));
 
 
Index: libhttpd/api.c
===================================================================
--- libhttpd/api.c	(revision 1343)
+++ libhttpd/api.c	(working copy)
@@ -50,7 +50,7 @@
 
 
 char *httpdUrlEncode(str)
-	char	*str;
+	const char	*str;
 {
         char    *new,
                 *cp;
@@ -88,7 +88,7 @@
 }
 
 
-httpVar *httpdGetVariableByName(request *r, char *name)
+httpVar *httpdGetVariableByName(request *r, const char *name)
 {
 	httpVar	*curVar;
 
@@ -104,7 +104,7 @@
 
 
 
-httpVar *httpdGetVariableByPrefix(request *r, char *prefix)
+httpVar *httpdGetVariableByPrefix(request *r, const char *prefix)
 {
 	httpVar	*curVar;
 
@@ -121,7 +121,7 @@
 }
 
 
-httpVar *httpdGetVariableByPrefixedName(request *r, char *prefix, char *name)
+httpVar *httpdGetVariableByPrefixedName(request *r, const char *prefix, const char *name)
 {
 	httpVar	*curVar;
 	int	prefixLen;
@@ -145,7 +145,7 @@
 
 httpVar *httpdGetNextVariableByPrefix(curVar, prefix)
 	httpVar	*curVar;
-	char	*prefix;
+	const char	*prefix;
 {
 	if(curVar)
 		curVar = curVar->nextVariable;
@@ -159,7 +159,7 @@
 }
 
 
-int httpdAddVariable(request *r, char *name, char *value)
+int httpdAddVariable(request *r, const char *name, const char *value)
 {
 	httpVar *curVar, *lastVar, *newVar;
 
@@ -640,7 +640,7 @@
 
 void httpdSetFileBase(server, path)
 	httpd	*server;
-	char	*path;
+	const char	*path;
 {
 	strncpy(server->fileBasePath, path, HTTP_MAX_URL);
 }
@@ -821,25 +821,25 @@
 	_httpd_sendHeaders(r, 0, 0);
 }
 
-void httpdSetResponse(request *r, char *msg)
+void httpdSetResponse(request *r, const char *msg)
 {
 	strncpy(r->response.response, msg, HTTP_MAX_URL);
 }
 
-void httpdSetContentType(request *r, char *type)
+void httpdSetContentType(request *r, const char *type)
 {
 	strcpy(r->response.contentType, type);
 }
 
 
-void httpdAddHeader(request *r, char *msg)
+void httpdAddHeader(request *r, const char *msg)
 {
 	strcat(r->response.headers,msg);
 	if (msg[strlen(msg) - 1] != '\n')
 		strcat(r->response.headers,"\n");
 }
 
-void httpdSetCookie(request *r, char *name, char *value)
+void httpdSetCookie(request *r, const char *name, const char *value)
 {
 	char	buf[HTTP_MAX_URL];
 
@@ -847,11 +847,11 @@
 	httpdAddHeader(r, buf);
 }
 
-void httpdOutput(request *r, char *msg)
+void httpdOutput(request *r, const char *msg)
 {
+	const char *src;
 	char	buf[HTTP_MAX_LEN],
 		varName[80],
-		*src,
 		*dest;
 	int	count;
 
@@ -862,8 +862,8 @@
 	{
 		if (*src == '$')
 		{
-			char	*cp,
-				*tmp;
+			const char *tmp;
+			char	*cp;
 			int	count2;
 			httpVar	*curVar;
 
@@ -907,14 +907,14 @@
 
 
 #ifdef HAVE_STDARG_H
-void httpdPrintf(request *r, char *fmt, ...)
+void httpdPrintf(request *r, const char *fmt, ...)
 {
 #else
 void httpdPrintf(va_alist)
         va_dcl
 {
         request		*r;;
-        char		*fmt;
+        const char	*fmt;
 #endif
         va_list         args;
 	char		buf[HTTP_MAX_LEN];

