solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: new Response() returns text/html

Open huseeiin opened this issue 6 months ago • 1 comments

Duplicates

  • [x] I have searched the existing issues

Latest version

  • [x] I have tested the latest version

Current behavior 😯

it convets the content-type to text/html

Expected behavior 🤔

it should be text/plain. in h3 or nitro, this becomes text/plain.

Steps to reproduce 🕹

in routes/test.ts:

export function GET(e) {
  e.nativeEvent.respondWith(new Response("test"));
}

Context 🔦

No response

Your environment 🌎


huseeiin avatar Jun 14 '25 09:06 huseeiin

I think you neeed return , otherwise it will be treated as a simple page routing

Set retrun: Image

Not set return: Image

allmors avatar Jun 18 '25 02:06 allmors

I think you neeed return , otherwise it will be treated as a simple page routing

Set retrun: Image

Not set return: Image

this shouldn't happen in ss, it doesn't happen in nitro/vinxi without ss

huseeiin avatar Jul 03 '25 13:07 huseeiin

i will close this when h3 v2 comes to ss because it won't even have respondWith

huseeiin avatar Jul 03 '25 13:07 huseeiin