-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.114 2012/03/09 16:24:36 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.119 2013/01/25 21:52:02 david__schmidt Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
* Purpose : Simple CGIs to get information about Privoxy's
* status.
*
- * Copyright : Written by and Copyright (C) 2001-2011 the
+ * Copyright : Written by and Copyright (C) 2001-2013 the
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
#include <string.h>
#include <assert.h>
-#ifdef HAVE_ACCESS
+#if defined (HAVE_ACCESS) && defined (HAVE_UNISTD_H)
#include <unistd.h>
-#endif /* def HAVE_ACCESS */
+#endif /* def HAVE_ACCESS && HAVE_UNISTD_H */
#include "project.h"
#include "cgi.h"
/*
* Repair the damage done to the IOB by get_header()
*/
- for (p = csp->iob->buf; p < csp->iob->eod; p++)
+ for (p = csp->client_iob->buf; p < csp->client_iob->cur; p++)
{
if (*p == '\0') *p = '\n';
}
* be sending to the server if this wasn't a CGI call
*/
- if (map(exports, "client-request", 1, html_encode(csp->iob->buf), 0))
+ if (map(exports, "client-request", 1, html_encode(csp->client_iob->buf), 0))
{
free_map(exports);
return JB_ERR_MEMORY;
case SOCKS_5:
socks_type = "socks5";
break;
+ case SOCKS_5T:
+ socks_type = "socks5t";
+ break;
default:
log_error(LOG_LEVEL_FATAL, "Unknown socks type: %d.", fwd->type);
}
if (!err) err = map_conditional(exports, "FEATURE_STATISTICS", 0);
#endif /* ndef FEATURE_STATISTICS */
+#ifdef FEATURE_STRPTIME_SANITY_CHECKS
+ if (!err) err = map_conditional(exports, "FEATURE_STRPTIME_SANITY_CHECKS", 1);
+#else /* ifndef FEATURE_STRPTIME_SANITY_CHECKS */
+ if (!err) err = map_conditional(exports, "FEATURE_STRPTIME_SANITY_CHECKS", 0);
+#endif /* ndef FEATURE_STRPTIME_SANITY_CHECKS */
+
#ifdef FEATURE_TOGGLE
if (!err) err = map_conditional(exports, "FEATURE_TOGGLE", 1);
#else /* ifndef FEATURE_TOGGLE */