diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-06-26 21:45:07 +0200 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-06-26 21:45:07 +0200 |
commit | 001b387bcdb1644aea9d7c523dedf5ac04f3c4b4 (patch) | |
tree | 50cf13c57153893234bd5bf3611dc183ab6ee5f3 /include | |
parent | Fix mod_ext_filter to look in the main server for filter definitions (diff) | |
download | apache2-001b387bcdb1644aea9d7c523dedf5ac04f3c4b4.tar.xz apache2-001b387bcdb1644aea9d7c523dedf5ac04f3c4b4.zip |
Change conn_rec->keepalive to an enumerated value of
AP_CONN_UNKNOWN
AP_CONN_CLOSE
AP_CONN_KEEPALIVE
This also fixes a problem where ap_discard_request_body would not discard
the body when keepalive was 0. This actually meant the keepalive status
was unknown *not* closed, but no one ever remembered that.
This problem was seen with mod_dav sending error responses (as reported by
Karl Fogel).
Suggested by: Greg "this isn't the '80s" Stein
Reviewed by: Greg Ames
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/ap_mmn.h | 5 | ||||
-rw-r--r-- | include/httpd.h | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 13938579b1..58b7a7fc43 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -108,14 +108,15 @@ * 20020529 (2.0.37-dev) Standardized the names of some apr_pool_*_set funcs * 20020602 (2.0.37-dev) Bucket API change (metadata buckets) * 20020612 (2.0.38-dev) Changed server_rec->[keep_alive_]timeout to apr time + * 20020625 (2.0.40-dev) Changed conn_rec->keepalive to an enumeration */ #define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */ #ifndef MODULE_MAGIC_NUMBER_MAJOR -#define MODULE_MAGIC_NUMBER_MAJOR 20020612 +#define MODULE_MAGIC_NUMBER_MAJOR 20020625 #endif -#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/httpd.h b/include/httpd.h index f563951cca..1b3279644e 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -951,6 +951,11 @@ struct request_rec { /* @} */ +typedef enum { + AP_CONN_UNKNOWN, + AP_CONN_CLOSE, + AP_CONN_KEEPALIVE +} ap_conn_keepalive_e; /** Structure to store things which are per connection */ struct conn_rec { @@ -981,8 +986,8 @@ struct conn_rec { unsigned aborted:1; /** Are we going to keep the connection alive for another request? - * -1 fatal error, 0 undecided, 1 yes */ - signed int keepalive:2; + * @see ap_conn_keepalive_e */ + ap_conn_keepalive_e keepalive; /** have we done double-reverse DNS? -1 yes/failure, 0 not yet, * 1 yes/success */ |