You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2001/04/08 11:49:50 UTC
cvs commit: httpd-proxy/module-2.0 mod_proxy.h proxy_http.c
minfrin 01/04/08 02:49:50
Modified: module-2.0 mod_proxy.h proxy_http.c
Log:
Add #defines for protocol version checks...
Revision Changes Path
1.36 +5 -0 httpd-proxy/module-2.0/mod_proxy.h
Index: mod_proxy.h
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- mod_proxy.h 2001/04/06 14:25:53 1.35
+++ mod_proxy.h 2001/04/08 09:49:49 1.36
@@ -155,6 +155,11 @@
};
#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 '*' */
1.48 +1 -1 httpd-proxy/module-2.0/proxy_http.c
Index: proxy_http.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_http.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- proxy_http.c 2001/04/07 19:41:03 1.47
+++ proxy_http.c 2001/04/08 09:49:49 1.48
@@ -738,7 +738,7 @@
/* 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;
}
Re: cvs commit: httpd-proxy/module-2.0 mod_proxy.h proxy_http.c
Posted by Graham Leggett <mi...@sharp.fm>.
rbb@covalent.net wrote:
> Whooa. We have HTTP_VERSION() for this. You pass in the major and minor
> numbers for the HTTP version, and it returns the correct values.
Fixed.
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm "There's a moon
over Bourbon Street
tonight..."
Re: cvs commit: httpd-proxy/module-2.0 mod_proxy.h proxy_http.c
Posted by rb...@covalent.net.
Whooa. We have HTTP_VERSION() for this. You pass in the major and minor
numbers for the HTTP version, and it returns the correct values.
Ryan
On 8 Apr 2001 minfrin@apache.org wrote:
> minfrin 01/04/08 02:49:50
>
> Modified: module-2.0 mod_proxy.h proxy_http.c
> Log:
> Add #defines for protocol version checks...
>
> Revision Changes Path
> 1.36 +5 -0 httpd-proxy/module-2.0/mod_proxy.h
>
> Index: mod_proxy.h
> ===================================================================
> RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.h,v
> retrieving revision 1.35
> retrieving revision 1.36
> diff -u -r1.35 -r1.36
> --- mod_proxy.h 2001/04/06 14:25:53 1.35
> +++ mod_proxy.h 2001/04/08 09:49:49 1.36
> @@ -155,6 +155,11 @@
> };
> #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 '*' */
>
>
>
> 1.48 +1 -1 httpd-proxy/module-2.0/proxy_http.c
>
> Index: proxy_http.c
> ===================================================================
> RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_http.c,v
> retrieving revision 1.47
> retrieving revision 1.48
> diff -u -r1.47 -r1.48
> --- proxy_http.c 2001/04/07 19:41:03 1.47
> +++ proxy_http.c 2001/04/08 09:49:49 1.48
> @@ -738,7 +738,7 @@
> /* 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;
> }
>
>
>
>
>
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------