Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

test: HTTP weirdness #656

Merged
merged 2 commits into from
Dec 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/request-api.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ describe('\'deal with HTTP weirdness\' tests', () => {
// go-ipfs always (currently) adds a content-type header, even if no content is present,
// the standard behaviour for an http-api is to omit this header if no content is present
const server = require('http').createServer((req, res) => {
res.writeHead(200)
res.end()
// Consume the entire request, before responding.
req.on('data', () => {})
req.on('end', () => {
res.writeHead(200)
res.end()
})
})

server.listen(6001, () => {
Expand Down