Skip to content

fix: Set context for requests properly#526

Merged
patryk merged 2 commits intocloudflare:masterfrom
sebnow:fix-context-on-requests
Sep 29, 2020
Merged

fix: Set context for requests properly#526
patryk merged 2 commits intocloudflare:masterfrom
sebnow:fix-context-on-requests

Conversation

@sebnow
Copy link
Copy Markdown

@sebnow sebnow commented Sep 9, 2020

Description

WithContext does not mutate the request, and the returned Request value is ignored, so context for requests is never actually being set.

Has your change been tested?

A regression test was added that ensure the context is properly passed. It failed prior to changes to the implementation.

Types of changes

What sort of change does your code introduce/modify?

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

`WithContext` does not mutate the request, and the returned `Request`
value is ignored, so context for requests is never actually being set.
@sebnow sebnow force-pushed the fix-context-on-requests branch from 28574ee to 3ed8614 Compare September 9, 2020 13:10
@patryk patryk merged commit fe9e116 into cloudflare:master Sep 29, 2020
@patryk
Copy link
Copy Markdown

patryk commented Sep 29, 2020

Thanks!

@sebnow sebnow deleted the fix-context-on-requests branch September 30, 2020 08:00
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