You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by fa...@hyperreal.org on 2000/01/12 16:23:29 UTC
cvs commit: apache-1.3/src/modules/standard mod_digest.c mod_rewrite.c mod_speling.c
fanf 00/01/12 07:23:29
Modified: src/modules/experimental mod_auth_digest.c
src/modules/standard mod_digest.c mod_rewrite.c
mod_speling.c
Log:
Don't convert auth to proxy auth when it shouldn't be.
Revision Changes Path
1.13 +9 -8 apache-1.3/src/modules/experimental/mod_auth_digest.c
Index: mod_auth_digest.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/experimental/mod_auth_digest.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- mod_auth_digest.c 1999/12/09 05:21:00 1.12
+++ mod_auth_digest.c 2000/01/12 15:23:23 1.13
@@ -826,14 +826,14 @@
/* Parse the Authorization header, if it exists */
static int get_digest_rec(request_rec *r, digest_header_rec *resp)
{
- const char *auth_line = ap_table_get(r->headers_in,
- r->proxyreq ? "Proxy-Authorization"
- : "Authorization");
+ const char *auth_line;
size_t l;
int vk = 0, vv = 0;
char *key, *value;
-
+ auth_line = ap_table_get(r->headers_in,
+ r->proxyreq == STD_PROXY ? "Proxy-Authorization"
+ : "Authorization");
if (!auth_line) {
resp->auth_hdr_sts = NO_HEADER;
return !OK;
@@ -1270,7 +1270,7 @@
* unneccessarily (it's usually > 200 bytes!).
*/
- if (r->proxyreq)
+ if (r->proxyreq != NOT_PROXY)
domain = NULL; /* don't send domain for proxy requests */
else if (conf->uri_list)
domain = conf->uri_list;
@@ -1285,7 +1285,8 @@
}
ap_table_mergen(r->err_headers_out,
- r->proxyreq ? "Proxy-Authenticate" : "WWW-Authenticate",
+ r->proxyreq == STD_PROXY ? "Proxy-Authenticate"
+ : "WWW-Authenticate",
ap_psprintf(r->pool, "Digest realm=\"%s\", nonce=\"%s\", "
"algorithm=%s%s%s%s%s",
ap_auth_name(r), nonce, conf->algorithm,
@@ -1986,8 +1987,8 @@
if (ai && ai[0])
ap_table_mergen(r->headers_out,
- r->proxyreq ? "Proxy-Authentication-Info" :
- "Authentication-Info",
+ r->proxyreq == STD_PROXY ? "Proxy-Authentication-Info"
+ : "Authentication-Info",
ai);
return OK;
}
1.43 +4 -3 apache-1.3/src/modules/standard/mod_digest.c
Index: mod_digest.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_digest.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- mod_digest.c 1999/10/21 20:45:24 1.42
+++ mod_digest.c 2000/01/12 15:23:24 1.43
@@ -136,9 +136,7 @@
static int get_digest_rec(request_rec *r, digest_header_rec * response)
{
- const char *auth_line = ap_table_get(r->headers_in,
- r->proxyreq ? "Proxy-Authorization"
- : "Authorization");
+ const char *auth_line;
int l;
int s, vk = 0, vv = 0;
const char *t;
@@ -154,6 +152,9 @@
return SERVER_ERROR;
}
+ auth_line = ap_table_get(r->headers_in,
+ r->proxyreq == STD_PROXY ? "Proxy-Authorization"
+ : "Authorization");
if (!auth_line) {
ap_note_digest_auth_failure(r);
return AUTH_REQUIRED;
1.154 +2 -2 apache-1.3/src/modules/standard/mod_rewrite.c
Index: mod_rewrite.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -r1.153 -r1.154
--- mod_rewrite.c 1999/12/04 11:43:17 1.153
+++ mod_rewrite.c 2000/01/12 15:23:25 1.154
@@ -1123,7 +1123,7 @@
}
/* now make sure the request gets handled by the proxy handler */
- r->proxyreq = 1;
+ r->proxyreq = STD_PROXY;
r->handler = "proxy-server";
rewritelog(r, 1, "go-ahead with proxy request %s [OK]",
@@ -1387,7 +1387,7 @@
}
/* now make sure the request gets handled by the proxy handler */
- r->proxyreq = 1;
+ r->proxyreq = STD_PROXY;
r->handler = "proxy-server";
rewritelog(r, 1, "[per-dir %s] go-ahead with proxy request "
1.35 +1 -1 apache-1.3/src/modules/standard/mod_speling.c
Index: mod_speling.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_speling.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- mod_speling.c 1999/10/21 20:45:40 1.34
+++ mod_speling.c 2000/01/12 15:23:25 1.35
@@ -244,7 +244,7 @@
}
/* We've already got a file of some kind or another */
- if (r->proxyreq || (r->finfo.st_mode != 0)) {
+ if (r->proxyreq != NOT_PROXY || (r->finfo.st_mode != 0)) {
return DECLINED;
}