static middleware causes an unknown error for long URLs #609

ghost opened this Issue Jun 26, 2012 · 3 comments

2 participants


This tiny server will return a 500: unknown error when given a URL longer than 255 bytes:

connect = require('connect');
var app = connect()
  .use(function(req, res){
    res.end('hello world\n');

// this will work (255 a's):
// http://localhost:3000/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

// this will trigger an unknown error (256 a's):
// http://localhost:3000/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Removing the static middleware will make long URLs work, however.

Sencha Labs member
tj commented Jun 26, 2012

on an ENAMETOOLONG it should just pass control to the next middleware. which version(s)? perhaps you're using an older version without this fix


node 0.6.7
connect 2.3.4

About to try upgrading node?


Ah, I see where that is. More debugging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment