Skip to content

Commit 32042ac

Browse files
committed
test(solidstart): Send Content-Length with the tunnel test requests
The tunnel handler now answers a request without one with a 411.
1 parent 9ade674 commit 32042ac

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/solidstart/test/nitro/tunnelPlugin.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ describe('SolidStart v1 tunnel plugin', () => {
5050
vi.stubGlobal('fetch', sentryFetch);
5151
const envelope = serializeEnvelope(createEnvelope({ dsn: DSN }, [])) as string;
5252

53-
const response = await fetchApp(getTunnelPath(DSN)!, { method: 'POST', body: envelope });
53+
const response = await fetchApp(getTunnelPath(DSN)!, {
54+
method: 'POST',
55+
body: envelope,
56+
headers: { 'content-length': String(envelope.length) },
57+
});
5458

5559
expect(await response.text()).toBe('forwarded');
5660
expect(await new Response(sentryFetch.mock.lastCall![1].body).text()).toBe(envelope);

0 commit comments

Comments
 (0)