From a0cc18809c72f9fa66166c18139952b85509e54c Mon Sep 17 00:00:00 2001 From: jongfoster Date: Tue, 4 Jun 2002 16:35:56 +0000 Subject: [PATCH] Moving three variable declarations to jcc.c from project.h --- src/jcc.c | 34 +++++++++++++++++++++++++++++++--- src/project.h | 22 +++++----------------- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/src/jcc.c b/src/jcc.c index 5dd10e03..82fc0e65 100644 --- a/src/jcc.c +++ b/src/jcc.c @@ -1,7 +1,7 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.92 2002/05/08 16:00:46 oes Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 2.0 2002/06/04 14:34:21 jongfoster Exp $"; /********************************************************************* * - * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ + * File : $Source: /cvsroot/ijbswa/current/src/jcc.c,v $ * * Purpose : Main file. Contains main() method, main loop, and * the main connection-handling function. @@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.92 2002/05/08 16:00:46 oes Exp $"; * * Revisions : * $Log: jcc.c,v $ + * Revision 2.0 2002/06/04 14:34:21 jongfoster + * Moving source files to src/ + * * Revision 1.92 2002/05/08 16:00:46 oes * Chat's buffer handling: * - Fixed bug with unchecked out-of-mem conditions @@ -663,7 +666,9 @@ const char *pidfile = NULL; int received_hup_signal = 0; #endif /* defined unix */ -/* The vanilla wafer. */ +/** + * The vanilla wafer. + */ static const char VANILLA_WAFER[] = "NOTICE=TO_WHOM_IT_MAY_CONCERN_" "Do_not_send_me_any_copyrighted_information_other_than_the_" @@ -674,6 +679,29 @@ static const char VANILLA_WAFER[] = "(copyright_or_otherwise)_applying_to_any_cookie._"; +/** + * HTTP header sent when doing HTTPS tunnelling ("CONNECT" method). + */ +static const char CSUCCEED[] = + "HTTP/1.0 200 Connection established\n" + "Proxy-Agent: Privoxy/" VERSION "\r\n\r\n"; + + +/** + * HTTP reply sent when the browser sends something unintelligible. + */ +static const char CHEADER[] = + "HTTP/1.0 400 Invalid header received from browser\r\n\r\n"; + + +/** + * HTTP reply sent when the browser tries to tunnel ("CONNECT") to something + * other than a HTTPS port (as defined by +limit-connect). + */ +static const char CFORBIDDEN[] = + "HTTP/1.0 403 Connection not allowable\r\nX-Hint: If you read this message interactively, then you know why this happens ,-)\r\n\r\n"; + + #if !defined(_WIN32) && !defined(__OS2__) && !defined(AMIGA) /********************************************************************* * diff --git a/src/project.h b/src/project.h index c63c94dc..01115682 100644 --- a/src/project.h +++ b/src/project.h @@ -1,10 +1,10 @@ #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED /** Version string. */ -#define PROJECT_H_VERSION "$Id: project.h,v 1.72 2002/05/14 21:35:49 oes Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 2.0 2002/06/04 14:34:21 jongfoster Exp $" /********************************************************************* * - * File : $Source: /cvsroot/ijbswa/current/project.h,v $ + * File : $Source: /cvsroot/ijbswa/current/src/project.h,v $ * * Purpose : Defines data structures which are widely used in the * project. Does not define any variables or functions @@ -37,6 +37,9 @@ * * Revisions : * $Log: project.h,v $ + * Revision 2.0 2002/06/04 14:34:21 jongfoster + * Moving source files to src/ + * * Revision 1.72 2002/05/14 21:35:49 oes * Split HELP_LINK_PREFIX into ACTIONS_HELP_PREFIX and CONFIG_HELP_PREFIX * because of split in user-manual @@ -1409,21 +1412,6 @@ struct configuration_spec #define CGI_PREFIX "http://" CGI_SITE_2_HOST CGI_SITE_2_PATH "/" -/* HTTP snipplets. - * - * FIXME: This is very inefficient. There could be one copy of these strings - * for each .c file!! They should be "extern", not "static". - */ -static const char CSUCCEED[] = - "HTTP/1.0 200 Connection established\n" - "Proxy-Agent: Privoxy/" VERSION "\r\n\r\n"; - -static const char CHEADER[] = - "HTTP/1.0 400 Invalid header received from browser\r\n\r\n"; - -static const char CFORBIDDEN[] = - "HTTP/1.0 403 Connection not allowable\r\nX-Hint: If you read this message interactively, then you know why this happens ,-)\r\n\r\n"; - #ifdef __cplusplus } /* extern "C" */ #endif -- 2.39.2