
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@allegiant/httpduplex
Advanced tools
Unifies http request and response streams.
There be 🐲 here! The API and functionality are being cemented, anything before a 1.0.0 release is subject to change.
npm install @allegiant/httpduplex
The following example can be found at example/index.js
const fs = require('fs');
const http = require('http');
const httpDuplex = require('@allegiant/httpduplex');
var server = http.createServer(function (req, res) {
var dup = new httpDuplex(req, res);
console.log(dup.method + ' ' + dup.url); // eslint-disable-line
if (dup.url == '/') {
dup.setHeader('content-type', 'text/plain');
if (dup.method === 'POST') {
let size = 0;
dup.on('data', buf => size += buf.length)
.on('end', () => dup.end(size + '\n'));
} else {
fs.createReadStream('README.md').pipe(dup);
}
} else {
dup.setHeader('content-type', 'text/html');
dup.statusCode = 404;
dup.end('Not found');
}
})
.on('listening', function () {
console.log('Listening http://localhost:' + server.address().port + '/'); // eslint-disable-line
})
.listen(7000);
Running the following command will start up a simple http server:
node example/index.js
This began as a compatiblity rewrite of http-duplex.
Copyright © 2017 Allegiant. Distributed under the terms of the MIT License, see LICENSE
0.3.6 (12/28/2017)
FAQs
Unifies http request and response streams.
The npm package @allegiant/httpduplex receives a total of 0 weekly downloads. As such, @allegiant/httpduplex popularity was classified as not popular.
We found that @allegiant/httpduplex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.