X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=cgisimple.c;h=07017022766bd2870ffe0a456336b27c7bd562ee;hp=0e9ce70df3d4c75e630d926d05571250d14e1969;hb=68b650b4265d93d1e1bbbbe7726c84df39e53d0e;hpb=0428133610c525457cb16f7ac6a54203a2743d6c diff --git a/cgisimple.c b/cgisimple.c index 0e9ce70d..07017022 100644 --- a/cgisimple.c +++ b/cgisimple.c @@ -1,4 +1,4 @@ -const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.110 2011/06/23 14:01:39 fabiankeil Exp $"; +const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.118 2012/12/07 12:45:20 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $ @@ -6,10 +6,7 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.110 2011/06/23 14:01:39 fabia * Purpose : Simple CGIs to get information about Privoxy's * status. * - * Functions declared include: - * - * - * 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 @@ -46,9 +43,9 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.110 2011/06/23 14:01:39 fabia #include #include -#ifdef HAVE_ACCESS +#if defined (HAVE_ACCESS) && defined (HAVE_UNISTD_H) #include -#endif /* def HAVE_ACCESS */ +#endif /* def HAVE_ACCESS && HAVE_UNISTD_H */ #include "project.h" #include "cgi.h" @@ -258,7 +255,7 @@ jb_err cgi_show_request(struct client_state *csp, /* * 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'; } @@ -268,7 +265,7 @@ jb_err cgi_show_request(struct client_state *csp, * 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; @@ -1144,7 +1141,7 @@ jb_err cgi_show_url_info(struct client_state *csp, { /* * Empty URL (just prefix). - * Make it totally empty so it's caught by the next if() + * Make it totally empty so it's caught by the next if () */ url_param[0] = '\0'; } @@ -1155,7 +1152,7 @@ jb_err cgi_show_url_info(struct client_state *csp, { /* * Empty URL (just prefix). - * Make it totally empty so it's caught by the next if() + * Make it totally empty so it's caught by the next if () */ url_param[0] = '\0'; } @@ -1411,6 +1408,9 @@ jb_err cgi_show_url_info(struct client_state *csp, 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); } @@ -1858,8 +1858,8 @@ static jb_err cgi_show_file(struct client_state *csp, return JB_ERR_MEMORY; } - if ( map(exports, "file-description", 1, file_description, 1) - || map(exports, "filepath", 1, html_encode(filename), 0) ) + if (map(exports, "file-description", 1, file_description, 1) + || map(exports, "filepath", 1, html_encode(filename), 0)) { free_map(exports); return JB_ERR_MEMORY;