Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: yorickvP/node-scgi-client
base: 5c8d4034bb
...
head fork: yorickvP/node-scgi-client
compare: af52e538ff
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 12 additions and 2 deletions.
  1. +1 −1  package.json
  2. +11 −1 scgi.js
View
2  package.json
@@ -2,7 +2,7 @@
"author": "Yorick",
"name": "scgi-client",
"description": "SCGI (Simple Common Gateway Interface) Client",
- "version": "0.0.2",
+ "version": "0.0.3",
"repository": {
"type": "git",
"url": "git://github.com/yorickvP/node-scgi-client.git"
View
12 scgi.js
@@ -92,10 +92,20 @@ module.exports = function makeSCGIRequest(port, host) {
// connect and send stuff
var stream = net.connect.apply(net, connect_params)
+
+ // very evil bug :/ need to pause the stream and buffer some data
+ var post_buffer = []
+ post_buffer.ondata = post_buffer.push.bind(post_buffer)
+ req.on('data', post_buffer.ondata)
+ req.pause()
stream.on('connect', function() {
message.forEach(function(x) {
- stream.write(x)})
+ stream.write(x)})
// pipe the request body to the scgi server
+ req.removeListener('data', post_buffer.ondata)
+ post_buffer.forEach(function(x) {
+ stream.write(x)})
+ req.resume()
req.pipe(stream) })

No commit comments for this range

Something went wrong with that request. Please try again.