From 72350d7e2738b513ea5b3cec00d1a5f9db79ac2c Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Wed, 7 Feb 2007 10:36:16 +0000 Subject: [PATCH] Add new http_response member to save the reason why the response was generated. --- project.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/project.h b/project.h index c2235423..56a37d54 100644 --- a/project.h +++ b/project.h @@ -1,7 +1,7 @@ #ifndef PROJECT_H_INCLUDED #define PROJECT_H_INCLUDED /** Version string. */ -#define PROJECT_H_VERSION "$Id: project.h,v 1.88 2007/01/25 13:36:59 fabiankeil Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 1.89 2007/01/27 13:09:16 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/project.h,v $ @@ -37,6 +37,10 @@ * * Revisions : * $Log: project.h,v $ + * Revision 1.89 2007/01/27 13:09:16 fabiankeil + * Add new config option "templdir" to + * change the templates directory. + * * Revision 1.88 2007/01/25 13:36:59 fabiankeil * Add csp->error_message for failure reasons * that should be embedded into the CGI pages. @@ -810,6 +814,21 @@ struct http_request int dcount; /**< How many parts to this domain? (length of dvec) */ }; +/** + * Reasons for generating a http_response instead of delivering + * the requested resource. Mostly ordered the way they are checked + * for in chat(). + */ +#define RSP_REASON_UNSUPPORTED 1 +#define RSP_REASON_BLOCKED 2 +#define RSP_REASON_UNTRUSTED 3 +#define RSP_REASON_REDIRECTED 4 +#define RSP_REASON_CGI_CALL 5 +#define RSP_REASON_NO_SUCH_DOMAIN 6 +#define RSP_REASON_FORWARDING_FAILED 7 +#define RSP_REASON_CONNECT_FAILED 8 +#define RSP_REASON_OUT_OF_MEMORY 9 +#define RSP_REASON_INTERNAL_ERROR 10 /** * Response generated by CGI, blocker, or error handler @@ -824,6 +843,7 @@ struct http_response size_t content_length; /**< Length of body, REQUIRED if binary body. */ int is_static; /**< Nonzero if the content will never change and should be cached by the browser (e.g. images). */ + int reason; /**< Why the response was generated in the first place. */ }; /** -- 2.39.2