X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=project.h;h=fdf153cbb91c4d321de3de512071744ff15d1d0a;hb=52703c962a31558d8de81df2748bdd450a66d534;hp=ab4e677696ad0a97247584f441aefa14b523e02b;hpb=caf0013d7d203d04c49137fd3f502ff73c506b72;p=privoxy.git diff --git a/project.h b/project.h index ab4e6776..fdf153cb 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.154 2010/01/10 13:53:48 ler762 Exp $" +#define PROJECT_H_VERSION "$Id: project.h,v 1.156 2010/05/24 11:38:22 fabiankeil Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/project.h,v $ @@ -308,33 +308,36 @@ struct http_request * 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 -#define RSP_REASON_CONNECTION_TIMEOUT 11 -#define RSP_REASON_NO_SERVER_DATA 12 +enum crunch_reason +{ + UNSUPPORTED, + BLOCKED, + UNTRUSTED, + REDIRECTED, + CGI_CALL, + NO_SUCH_DOMAIN, + FORWARDING_FAILED, + CONNECT_FAILED, + OUT_OF_MEMORY, + INTERNAL_ERROR, + CONNECTION_TIMEOUT, + NO_SERVER_DATA +}; /** * Response generated by CGI, blocker, or error handler */ struct http_response { - char *status; /**< HTTP status (string). */ - struct list headers[1]; /**< List of header lines. */ - char *head; /**< Formatted http response head. */ - size_t head_length; /**< Length of http response head. */ - char *body; /**< HTTP document body. */ - 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. */ + enum crunch_reason crunch_reason; /**< Why the response was generated in the first place. */ + char *status; /**< HTTP status (string). */ + struct list headers[1]; /**< List of header lines. */ + char *head; /**< Formatted http response head. */ + size_t head_length; /**< Length of http response head. */ + char *body; /**< HTTP document body. */ + 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). */ }; /**