From 20cde33c0b943c77a7c9d8d5d9c3d9281a6b13a5 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 1 Jun 2007 13:31:45 +0000 Subject: A better fix for the problem of the method not matching up with the digest auth. --- daemon/digest.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'daemon/digest.c') diff --git a/daemon/digest.c b/daemon/digest.c index 1c68366..ecde6b7 100644 --- a/daemon/digest.c +++ b/daemon/digest.c @@ -356,7 +356,7 @@ int digest_pre_check(digest_context_t* dg, const ha_context_t* opts, ha_buffer_t return HA_BADREQ; } - if(!opts->digest_ignoreuri && strcmp(dg->client.uri, dg->server_uri) != 0) + if(!opts->digest_allowany && strcmp(dg->client.uri, dg->server_uri) != 0) { ha_uri_t d_uri; ha_uri_t s_uri; @@ -489,7 +489,12 @@ int digest_complete_check(digest_context_t* dg, const ha_context_t* opts, ha_buf const char** m; int ret; - if(opts->digest_ignoremethod) + /* Use the method sent to us */ + ret = internal_check (dg, dg->server_method, buf); + if(ret != HA_FALSE) + return ret; + + if(opts->digest_allowany) { /* Try out each and every method in HTTP */ for(m = g_http_methods; *m; ++m) @@ -499,11 +504,6 @@ int digest_complete_check(digest_context_t* dg, const ha_context_t* opts, ha_buf break; } } - else - { - /* Use the method sent to us */ - ret = internal_check (dg, dg->server_method, buf); - } return ret; } -- cgit v1.2.3