We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f73a4c commit ea2bda7Copy full SHA for ea2bda7
1 file changed
lib/util.js
@@ -188,16 +188,16 @@ async function parseResponse(output) {
188
});
189
190
for await (let line of rl) {
191
- line = line.trim();
192
-
193
const index = line.indexOf(":");
+
194
if (index !== -1) {
195
const key = line.slice(0, index).trim();
196
- const value = line.slice(index + 1).trim();
+ const value = line.slice(index + 1);
197
if (key.toLowerCase() === "status") {
198
status = parseInt(value, 10);
199
} else {
200
- headers[key] = value;
+ headers[key] = value.trim();
201
}
202
} else if (line.match(/^HTTP\/1\.1/i)) {
203
status = parseInt(line.split(/\s+/)[1], 10);
0 commit comments