bminer / node-static-asset

Static asset manager for Node.JS and Express
MIT License
48 stars 13 forks source link

Replace deprecated res.send(status) of express, to res.sendStatus(status... #13

Closed aletorrado closed 10 years ago

aletorrado commented 10 years ago

res.send(status) is now deprecated on express. I've replaced it with the recommended res.sendStatus(status).

bminer commented 10 years ago

Is this backward compatible with Express 3? If not, package.json needs to be updated, or there needs to be some version checking built into node-static-asset.

Thoughts?

bminer commented 10 years ago

Also, by the way, thank you for the PR. I really appreciate it!

aletorrado commented 10 years ago

I think it's not. I haven't touched package.json because express isn't an explicit dependency.

bminer commented 10 years ago

@aletorrado - Can you change to something like return (res.sendStatus || res.send)(304); to ensure backward compatibility?

Thanks!

aletorrado commented 10 years ago

Great. Thank you.

bminer commented 10 years ago

No problem. Thanks for the suggestion to migrate to Express 4 API. I prefer the 4.x res.sendStatus anyway... a little more explicit IMHO.