Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #47, credit erankor #48

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions aws_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -324,11 +325,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;
}
Expand Down Expand Up @@ -360,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;
}
Expand Down
8 changes: 4 additions & 4 deletions ngx_http_aws_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static ngx_command_t ngx_http_aws_auth_commands[] = {
0,
0,
NULL },

ngx_null_command
};

Expand Down Expand Up @@ -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 *
Expand Down Expand Up @@ -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;
}
Expand All @@ -237,7 +237,7 @@ ngx_aws_auth_req_init(ngx_conf_t *cf)

return NGX_OK;
}
/*
/*
* vim: ts=4 sw=4 et
*/