This project is archived and is in readonly mode.
ActiveResource 'head' request sends headers with a nil key
-
Elliot Winkler
- Tag changed from activeresource to activeresource, patch
Here's a patch that fixes the issue for me.
-
FiXato
In revision 16b9a554db7e1bf3f5f224cdc5b4d27480e053ff correct http headers have been added per http method type, but the header for the HEAD request was ommitted. This could also be fixed by making head sent a :head method:
-
Elliot Winkler
That actually looks better, mine was kind of a hack. I guess you should add tests?
-
Pratik
- Assigned user set to Pratik
- State changed from new to incomplete
Looks good. But missing tests. Will apply once we have a patch with tests.
Thanks!
-
Joshua Bates
Here's a patch with tests. Using a Net::HTTP object in the test seems brittle, but I'm not sure there are any better choices outside of leaving it uncovered.
-
dirkbj
In a REST environment, HEAD is most closely associated with a GET request, but the request does not return content in the response body. Is putting :head => 'Content-Type' in the HTTP_FORMAT_HEADER_NAMES hash really the best option when :head is not sending any content as a PUT or POST would? I am of the opinion the first patch is more in the spirit of REST.
-
Pratik
- State changed from incomplete to open
-
Santiago Pastorino
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
