Skip to content

Conversation

@SATVIKsynopsis
Copy link
Contributor

Fixes #865

Fixes the issue where RequestInit could inject invalid default headers and cf options, causing Request::new_with_init to fail even for minimal requests.

Only set headers when non empty and only attach cf when non default. and also added a test for RequestInit.

@guybedford guybedford merged commit ba4b65d into cloudflare:main Jan 21, 2026
8 checks passed
@SATVIKsynopsis
Copy link
Contributor Author

Thanks a lot for the review and merge.
Appreciate the guidance and looking forward to contributing more to workers-rs.

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.

[BUG] worker::RequestInit, it's always error 'invalid URL or options for Request'.

2 participants