Skip to content

Not compatible with connect-static-file middleware #57

@skleeschulte

Description

@skleeschulte

connect-static-file middleware does not work with union. With connect, it works as expected:

var connect = require('connect')
  , http = require('http')
  , staticFile = require('connect-static-file');

var app = connect()
  .use(staticFile('index.js'));

http.createServer(app).listen(3000);

With union, the browser never gets a response (loading and loading and loading)...:

var connect = require('connect')
  , union = require('union')
  , staticFile = require('connect-static-file');

var server = union.createServer({
  buffer: false,
  before: [
    staticFile('index.js')
  ]
}).listen(3000);

connect-static-file uses send under the hood. Tested with:

"connect": "^3.6.2",
"connect-static-file": "^1.2.0",
"union": "^0.4.6"
node v6.10.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions