From 7f6c1eb35cdc8dbe0d23a756652c7a4522861951 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sun, 8 Apr 2001 09:49:49 +0000 Subject: [PATCH] Add #defines for protocol version checks... PR: Obtained from: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88765 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy.h | 5 +++++ modules/proxy/proxy_http.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index 93d5bd8c1e4..fc56a20e0fb 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -155,6 +155,11 @@ struct proxy_services { }; #endif +/* different HTTP versions we need to care about */ +#define HTTP_0_9 0009 +#define HTTP_1_0 1000 +#define HTTP_1_1 1001 + /* static information about a remote proxy */ struct proxy_remote { const char *scheme; /* the schemes handled by this proxy, or '*' */ diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 9709a05fb4d..1873f813c2f 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -738,7 +738,7 @@ int ap_proxy_http_handler(request_rec *r, char *url, /* if the connection is < HTTP/1.1, or Connection: close, * we close the socket, otherwise we leave it open for KeepAlive support */ - if (close || (r->proto_num < 1001)) { + if (close || (r->proto_num < HTTP_1_1)) { apr_socket_close(sock); conf->client_socket = NULL; } -- 2.47.3