Comparing version 3.1.2-rc1 to 3.1.2
@@ -8,2 +8,7 @@ # MUHB Changelog | ||
## [v3.1.2] - 2023-05-04 | ||
### Fixed | ||
- auth request throwing when attempting to write final request body and the request was already `.end()`ed from userland | ||
## [v3.1.1] - 2022-05-06 | ||
@@ -10,0 +15,0 @@ |
@@ -0,0 +0,0 @@ import { ServerResponse, ClientRequest } from 'http'; |
{ | ||
"name": "muhb", | ||
"version": "3.1.2-rc1", | ||
"version": "3.1.2", | ||
"description": "A set of functions for coding easy to read HTTP requests.", | ||
@@ -5,0 +5,0 @@ "main": "lib/main.js", |
@@ -0,0 +0,0 @@ # MUHB |
@@ -520,51 +520,2 @@ /* eslint-env mocha */ | ||
it('Should abort authentication/stream without issues', async function(done){ | ||
const server = http.createServer((req, res) => { | ||
if(!req.headers.authorization){ | ||
res.statusCode = 401; | ||
res.setHeader('www-authenticate', 'Digest realm="http-auth@example.org", ' + | ||
'qop="auth", algorithm=MD5, ' + | ||
'nonce="7ypf/xlj9XXwfDPEoM4URrv/xwf94BcCAzFZH4GiTo0v", ' + | ||
'opaque="FQhe/qaU925kfnzjCev0ciny7QMkPqMAFRtzCUYo5tdS"'); | ||
console.log('ANSWERED'); | ||
return res.end(); | ||
} | ||
req.on('data', buf => { | ||
assert.strictEqual(buf.toString('utf8'), 'abcdef'); | ||
res.flushHeaders(); | ||
setTimeout(() => { | ||
res.write('OK'); | ||
res.end(); | ||
}, 500); | ||
}); | ||
}); | ||
server.listen(8455); | ||
const req = muhb.post('http://john:doe@localhost:8455/foobar', { stream: true }); | ||
req.end(); | ||
console.log('ENDED'); | ||
done(); | ||
// const res = await req; | ||
// await new Promise(done => res.on('data', buf => { | ||
// assert.strictEqual(buf.toString('utf8'), 'OK'); | ||
// setTimeout(() => { | ||
// req.end(); | ||
// server.close(); | ||
// done(); | ||
// }, 500); | ||
// })); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
53365
1013