From b5103f8eca15d29a77eb095b14bcdaed86d19f75 Mon Sep 17 00:00:00 2001 From: Erno Kaikkonen Date: Wed, 25 Oct 2017 12:54:47 +0300 Subject: [PATCH 1/3] Fix issue #47, credit erankor --- ngx_http_aws_auth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ngx_http_aws_auth.c b/ngx_http_aws_auth.c index 080c817..075b033 100644 --- a/ngx_http_aws_auth.c +++ b/ngx_http_aws_auth.c @@ -65,7 +65,7 @@ static ngx_command_t ngx_http_aws_auth_commands[] = { 0, 0, NULL }, - + ngx_null_command }; @@ -111,7 +111,7 @@ ngx_http_aws_auth_create_loc_conf(ngx_conf_t *cf) return NGX_CONF_ERROR; } - return conf; + return conf; } static char * @@ -228,7 +228,7 @@ ngx_aws_auth_req_init(ngx_conf_t *cf) cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); - h = ngx_array_push(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers); + h = ngx_array_push(&cmcf->phases[NGX_HTTP_PREACCESS_PHASE].handlers); if (h == NULL) { return NGX_ERROR; } @@ -237,7 +237,7 @@ ngx_aws_auth_req_init(ngx_conf_t *cf) return NGX_OK; } -/* +/* * vim: ts=4 sw=4 et */ From 790e72ce7bd0ca1246ac192213c5a63c1b4ee79c Mon Sep 17 00:00:00 2001 From: Tero Tiainen Date: Fri, 10 Nov 2017 14:32:51 +0200 Subject: [PATCH 2/3] remove unnecessary log entries --- aws_functions.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aws_functions.h b/aws_functions.h index 1e2ff70..5e6cc77 100644 --- a/aws_functions.h +++ b/aws_functions.h @@ -324,11 +324,14 @@ static inline const ngx_str_t* ngx_aws_auth__canon_url(ngx_pool_t *pool, const n ngx_memcpy(retval->data, req_uri_data, req_uri_len); retval->len = req_uri_len; - safe_ngx_log_error(req, "canonical url extracted before URI encoding is %V", retval); +// remove unnecessary log entries +// safe_ngx_log_error(req, "canonical url extracted before URI encoding is %V", retval); // then URI-encode it per RFC 3986 ngx_aws_auth__escape_uri(pool, retval); - safe_ngx_log_error(req, "canonical url extracted after URI encoding is %V", retval); + +// remove unnecessary log entries +// safe_ngx_log_error(req, "canonical url extracted after URI encoding is %V", retval); return retval; } From 1b8f3807f8406eef1350df63d2cb1c8a1b29ea74 Mon Sep 17 00:00:00 2001 From: Antti Tupeli Date: Mon, 11 Feb 2019 14:51:08 +0200 Subject: [PATCH 3/3] Remove more unnecessary log entries --- aws_functions.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aws_functions.h b/aws_functions.h index 5e6cc77..39ce974 100644 --- a/aws_functions.h +++ b/aws_functions.h @@ -160,7 +160,8 @@ static inline const ngx_str_t* ngx_aws_auth__canonize_query_string(ngx_pool_t *p } retval->len--; - safe_ngx_log_error(req, "canonical qs constructed is %V", retval); +// remove unnecessary log entries +// safe_ngx_log_error(req, "canonical qs constructed is %V", retval); return retval; } @@ -363,7 +364,8 @@ static inline struct AwsCanonicalRequestDetails ngx_aws_auth__make_canonical_req canon_headers.signed_header_names, request_body_hash) - retval.canon_request->data; retval.header_list = canon_headers.header_list; - safe_ngx_log_error(req, "canonical req is %V", retval.canon_request); +// remove unnecessary log entries +// safe_ngx_log_error(req, "canonical req is %V", retval.canon_request); return retval; }