It seems that locally the asset pipeline only responds to GET requests, not HEAD requests.
GET:
curl 'http://localhost:3000/assets/scriptcam.swf' -X GET -I
HTTP/1.1 200 OK
HEAD:
curl 'http://localhost:3000/assets/scriptcam.swf' -X HEAD -I
HTTP/1.1 404 Not Found
This problem came up because a library I'm using (scriptcam.js) does a HEAD request to check if the file exists first before doing a full GET. In production, it works fine because the files are served up by nginx which knows how to respond to both methods.
Not sure if this should be tagged as a feature request or bug report. It's fairly easy to workaround but it would be nice to be able to have local mirror standard production capabilities.
It seems that locally the asset pipeline only responds to GET requests, not HEAD requests.
GET:
HEAD:
This problem came up because a library I'm using (scriptcam.js) does a HEAD request to check if the file exists first before doing a full GET. In production, it works fine because the files are served up by nginx which knows how to respond to both methods.
Not sure if this should be tagged as a feature request or bug report. It's fairly easy to workaround but it would be nice to be able to have local mirror standard production capabilities.