Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middler hangs after exactly 10 requests #8

Closed
jessestreet opened this issue Oct 10, 2013 · 2 comments
Closed

Middler hangs after exactly 10 requests #8

jessestreet opened this issue Oct 10, 2013 · 2 comments

Comments

@jessestreet
Copy link

node version: 0.10.15 and/or 0.10.18

Only seems to be happening in Chrome (v30.0.1599.69) and only when there's an image being rendered...

Doesn't work:

var middler = require('middler')
  , server = require('http').createServer()
  ;

middler(server)
  .get('/', function(req, res, next) {
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.write('<h2>Middler</h2>');
    res.end('<img src="http://s3.amazonaws.com/petitions-dev/NUmWHfCZWbl5iEPO/NUmZjXGQ6xxsHJ3w/facebook-share/published/fullsize.jpg" />');
  });

server.listen(3001);

Works:

var http = require('http');

http.createServer(function (req, res, next) {
  res.writeHead(200, {'Content-type': 'text/html'});
  res.write('<h2>Vanilla node</h2>');
  res.end('<img src="http://s3.amazonaws.com/petitions-dev/NUmWHfCZWbl5iEPO/NUmZjXGQ6xxsHJ3w/facebook-share/published/fullsize.jpg" />');
}).listen(3001);
@carlos8f
Copy link
Owner

I reproduced it but fixed by adding a 404 handler.

@jessestreet
Copy link
Author

Indeed, thank you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants