Uncaught ENAMETOOLONG errors in static middleware #369

Closed
aseemk opened this Issue Sep 15, 2011 · 6 comments

Projects

None yet

3 participants

@aseemk
aseemk commented Sep 15, 2011

Hey guys,

If a long URL comes in, the static middleware fails to gracefully catch a system ENAMETOOLONG error when it checks if there's a static file on disk for this URL.

E.g.:

Error: ENAMETOOLONG, File name too long '/home/dotcloud/rsync-1315933324.23/www/public/4867-3-Pair-Motorcycle-Riding-Glasses-Smoke-Clear-Yellow-foam-padding-on-the-entire-inside-of-the-glasses-to-fit-snug-to-your-face-and-protect-against-wind-dust-anhd-sweat-getting-into-your-eyes-Also-has-comfortable-rubber-ear-pads-Each-pair-comes-with-a-Soft-Micro-Fiber-Bag-to-Clean-them-or-store-them-in'

Strangely, our logging doesn't show stack traces for these errors (not sure why), so I don't have a specific line number right now. I can look into it if that'll help though. We're on Connect 1.5.1 btw.

Thanks! Let me know if I can provide anything else.

@tj
Member
tj commented Sep 15, 2011

you're getting an uncaught exception?

@aseemk
aseemk commented Sep 15, 2011

Oh, sorry, no -- but I would expect Connect to not throw (pass) an error in this case. There is no such file on disk; I would expect the static middleware to do nothing but return static files on disk, and if they don't exist, continue regularly.

@tj
Member
tj commented Sep 15, 2011

ah ok, I see what you're saying now, sounds reasonable to me

@ryanrolds ryanrolds added a commit to ryanrolds/connect that referenced this issue Sep 16, 2011
@ryanrolds ryanrolds Improved handling of ENAMETOOLONG per #369 261d42b
@tj tj closed this Oct 14, 2011
@ryanrolds

And it's broken again by the libuv changes. joyent/libuv#247

@tj
Member
tj commented Nov 19, 2011

haha yeah, i dont think they saw that yet because it's not in the latest release AFAIK

@ryanrolds

Ah. I may take a stab at mapping it this weekend.

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