File tree 3 files changed +12
-1
lines changed
packages/react-router-dev/vite
3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @react-router/dev " : patch
3
+ ---
4
+
5
+ Fix "Status message is not supported by HTTP/2" error during dev when using HTTPS
Original file line number Diff line number Diff line change 145
145
- ivanjonas
146
146
- Ivanrenes
147
147
- JackPriceBurns
148
+ - jacob-briscoe
148
149
- jacob-ebey
149
150
- JaffParker
150
151
- jakkku
Original file line number Diff line number Diff line change @@ -86,7 +86,12 @@ export function fromNodeRequest(
86
86
// https://github.com/solidjs/solid-start/blob/7398163869b489cce503c167e284891cf51a6613/packages/start/node/fetch.js#L162-L185
87
87
export async function toNodeRequest ( res : Response , nodeRes : ServerResponse ) {
88
88
nodeRes . statusCode = res . status ;
89
- nodeRes . statusMessage = res . statusText ;
89
+
90
+ // HTTP/2 doesn't support status messages
91
+ // https://datatracker.ietf.org/doc/html/rfc7540#section-8.1.2.4
92
+ if ( ! nodeRes . req || nodeRes . req . httpVersionMajor < 2 ) {
93
+ nodeRes . statusMessage = res . statusText ;
94
+ }
90
95
91
96
let cookiesStrings = [ ] ;
92
97
You can’t perform that action at this time.
0 commit comments