Skip to content

Commit edd5a52

Browse files
committed
add res.statusCode for prep
1 parent 0ce11b1 commit edd5a52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/handlers/get.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,16 @@ async function handler (req, res, next) {
129129
statusCode = 206
130130
}
131131

132+
// prep use res status
133+
res.statusCode = statusCode
132134
if (prep && isRdf(contentType) && !res.sendEvents({
133135
config: { prep: prepConfig },
134136
body: stream,
135137
isBodyStream: true,
136138
headers
137139
})) return
138140

139-
res.writeHead(statusCode, headers)
141+
res.writeHead(statusCode, headers) // res.set sneds 'charset'
140142
return stream.pipe(res)
141143
}
142144

0 commit comments

Comments
 (0)