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

Handle missing x-amz-target header #70

Merged
merged 1 commit into from
Jun 22, 2020
Merged

Conversation

roborourke
Copy link
Contributor

In some cases - particularly on local environments $request_id can be truthy but empty, or without offset 0 being set, additionally the x-amz-target header isn't always set in requests to S3. This update ensures both cases don't cause warnings to be output but rather falls back to reasonable defaults.

A missing x-amz-target header will give amz-unknown-target as the value if it's not set.

In some cases - particularly on local environments `$request_id` can be truthy but empty, or without offset 0 being set, additionally the `x-amz-target` header isn't always set in requests to S3. This update ensures both cases don't cause warnings to be output but rather falls back to reasonable defaults.

A missing `x-amz-target` header will give `amz-unknown-target` as the value if it's not set.
@roborourke roborourke requested a review from joehoyle June 22, 2020 10:59
Copy link

@hm-linter hm-linter bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting failed (2 errors).

2 notices occurred in your codebase, but none on files/lines included in this PR.

@roborourke roborourke merged commit 557b9bc into master Jun 22, 2020
@roborourke roborourke deleted the handle-unset-amz-target branch June 22, 2020 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants