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(ext/fetch) Fix request clone error in flash server #16174

Merged
merged 10 commits into from
Jan 15, 2023

Conversation

tsar-boomba
Copy link
Contributor

Fixes #15858

Request cloning was not properly handling the flash inners.

Code like this now works as expected.

import { assertEquals } from 'https://deno.land/std@0.158.0/testing/asserts.ts';

// POST, PUT, and PATCH panic deno
Deno.serve(async (req) => {
	const cloned = req.clone();
	assertEquals(cloned.headers, req.headers);
	console.log(await req.text(), await cloned.json());
	return new Response('ok', {
		status: 200,
	});
});

Copy link
Member

@crowlKats crowlKats left a comment

Choose a reason for hiding this comment

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

LGTM

@crowlKats crowlKats merged commit efcbfd5 into denoland:main Jan 15, 2023
@tsar-boomba tsar-boomba deleted the fix-flash-request-clone branch March 25, 2023 19:38
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.

1.25.2 Deno.serve Request.clone() always throws error
2 participants