Small world, I've contributed a fair amount of code to node-paperboy. In fact, I'm the person who forgot to check for URL encoding in paths! Thanks for finding that. I thought about the whole 404 thing, funny thing is, I didn't really think of it as a bug at the time, since I had a specific set of use cases where not specifying a 404 would have been senseless. That's the likely cause for my myopia there.
However, the deal with paperboy is it's more of a starting point for writing your own file based HTTP server, not so much a drop it in and serve static files affair. It's got some other problems as well. I'd fix them, but I don't really use node.js anymore. If I were still using node here's what I'd look at with paperboy:
1. No tests (ugh)
2. I'm not sure what would happen if you tried serving a large file to a slow client (it reads in a stream based fashion, but since writing to the socket doesn't block, that memory has to go somewhere) Reads might need to be throttled.
3. It doesn't have sensible defaults, like the 404 thing.
All that stuff would be trivial to look at, hopefully someone will. I myself am not a node.js developer anymore (doing a lot of eventmachine).
Thanks for the patch, I'm sure felix will add it in soon enough.
Specifically, the zeromq.node library uses 100% of the CPU spinning in a busy-wait loop. There are plans to switch to a more reasonable architecture, but the author hasn't had the time to actually do it yet.
Wait a few months and I'm sure all this discussion will be horribly obsolete, of course.
However, the deal with paperboy is it's more of a starting point for writing your own file based HTTP server, not so much a drop it in and serve static files affair. It's got some other problems as well. I'd fix them, but I don't really use node.js anymore. If I were still using node here's what I'd look at with paperboy:
1. No tests (ugh)
2. I'm not sure what would happen if you tried serving a large file to a slow client (it reads in a stream based fashion, but since writing to the socket doesn't block, that memory has to go somewhere) Reads might need to be throttled.
3. It doesn't have sensible defaults, like the 404 thing.
All that stuff would be trivial to look at, hopefully someone will. I myself am not a node.js developer anymore (doing a lot of eventmachine).
Thanks for the patch, I'm sure felix will add it in soon enough.