{"action":"created","issue":{"url":"https://api.github.com/repos/rightscale/right_aws_api/issues/16","labels_url":"https://api.github.com/repos/rightscale/right_aws_api/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/rightscale/right_aws_api/issues/16/comments","events_url":"https://api.github.com/repos/rightscale/right_aws_api/issues/16/events","html_url":"https://github.com/rightscale/right_aws_api/issues/16","id":54387753,"number":16,"title":"Head request returns nothing (S3)","user":{"login":"mdchaney","id":25986,"avatar_url":"https://avatars.githubusercontent.com/u/25986?v=3","gravatar_id":"","url":"https://api.github.com/users/mdchaney","html_url":"https://github.com/mdchaney","followers_url":"https://api.github.com/users/mdchaney/followers","following_url":"https://api.github.com/users/mdchaney/following{/other_user}","gists_url":"https://api.github.com/users/mdchaney/gists{/gist_id}","starred_url":"https://api.github.com/users/mdchaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdchaney/subscriptions","organizations_url":"https://api.github.com/users/mdchaney/orgs","repos_url":"https://api.github.com/users/mdchaney/repos","events_url":"https://api.github.com/users/mdchaney/events{/privacy}","received_events_url":"https://api.github.com/users/mdchaney/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-14T22:42:05Z","updated_at":"2015-01-19T02:38:17Z","closed_at":"2015-01-17T15:23:57Z","body":"I'm assuming that all API requests return the body.\r\n\r\nTrying a simple example of putting a new object and then using \"head\" returns an empty string.  I can \"get\" just fine, but \"head\" is always empty.\r\n\r\n2.1.5 :040 > RIGHT_AWS_S3.put('test-bucket/test.txt', body: 'This is my text', headers: { 'content-type' => 'text/plain', 'x-amz-meta-hello' => 'hello' })\r\n2.1.5 :041 > RIGHT_AWS_S3.get('test-bucket/test.txt')\r\n => \"This is my text\" \r\n2.1.5 :042 > RIGHT_AWS_S3.head('test-bucket/test.txt')\r\n => \"\" \r\n\r\nUsing the old aws-s3 gem:\r\n\r\n>> o=S3Object.find('test.txt','test-bucket')\r\n=> #<AWS::S3::S3Object:0x70181021360560 '/test-bucket/test.txt'>\r\n>> pp o.about\r\n{\"x-amz-id-2\"=>\r\n  \"siTHRRTCaFkEuxqLIkQ9caa8gHJ/18R8gV0SxYSATXod+mzltWA3dBZUl0zGto4C\",\r\n \"x-amz-request-id\"=>\"1DD601B0FC0DDEA2\",\r\n \"date\"=>\"Wed, 14 Jan 2015 22:14:38 GMT\",\r\n \"last-modified\"=>\"Wed, 14 Jan 2015 21:42:53 GMT\",\r\n \"etag\"=>\"\\\"088b19be96ab393523e1553cf8e871e4\\\"\",\r\n \"accept-ranges\"=>\"bytes\",\r\n \"content-type\"=>\"text/plain\",\r\n \"content-length\"=>\"15\",\r\n \"server\"=>\"AmazonS3\"}\r\n=> {\"x-amz-id-2\"=>\"siTHRRTCaFkEuxqLIkQ9caa8gHJ/18R8gV0SxYSATXod+mzltWA3dBZUl0zGto4C\", \"x-amz-request-id\"=>\"1DD601B0FC0DDEA2\", \"date\"=>\"Wed, 14 Jan 2015 22:14:38 GMT\", \"last-modified\"=>\"Wed, 14 Jan 2015 21:42:53 GMT\", \"etag\"=>\"\\\"088b19be96ab393523e1553cf8e871e4\\\"\", \"accept-ranges\"=>\"bytes\", \"content-type\"=>\"text/plain\", \"content-length\"=>\"15\", \"server\"=>\"AmazonS3\"}\r\n>> pp o.metadata\r\n{\"x-amz-meta-hello\"=>\"hello\"}\r\n=> {\"x-amz-meta-hello\"=>\"hello\"}\r\n\r\nBack to right_aws_api:\r\n\r\n2.1.5 :043 > RIGHT_AWS_S3.ListObjects('Bucket' => 'test-bucket', prefix: 'test' )\r\n => {\"ListBucketResult\"=>{\"@xmlns\"=>\"http://s3.amazonaws.com/doc/2006-03-01/\", \"Name\"=>\"test-bucket\", \"Prefix\"=>\"test\", \"Marker\"=>nil, \"MaxKeys\"=>\"1000\", \"IsTruncated\"=>\"false\", \"Contents\"=>{\"Key\"=>\"test.txt\", \"LastModified\"=>\"2015-01-14T21:42:53.000Z\", \"ETag\"=>\"\\\"088b19be96ab393523e2553cf8e871e4\\\"\", \"Size\"=>\"15\", \"Owner\"=>{\"ID\"=>\"9fdbc1694174cebf7937e642dc933cbbe79b2106d8e3f394028334204e599fe5\", \"DisplayName\"=>\"mdchaney\"}, \"StorageClass\"=>\"STANDARD\"}}} \r\n2.1.5 :044 > info = RIGHT_AWS_S3.get('test-bucket', params: { prefix: 'test' })\r\n => {\"ListBucketResult\"=>{\"@xmlns\"=>\"http://s3.amazonaws.com/doc/2006-03-01/\", \"Name\"=>\"test-bucket\", \"Prefix\"=>\"test\", \"Marker\"=>nil, \"MaxKeys\"=>\"1000\", \"IsTruncated\"=>\"false\", \"Contents\"=>{\"Key\"=>\"test.txt\", \"LastModified\"=>\"2015-01-14T21:42:53.000Z\", \"ETag\"=>\"\\\"088b19be96ab393523e2553cf8e871e4\\\"\", \"Size\"=>\"15\", \"Owner\"=>{\"ID\"=>\"9fdbc1694174cebf7937e642dc933cbbe79b2106d8e3f394028334204e599fe5\", \"DisplayName\"=>\"mdchaney\"}, \"StorageClass\"=>\"STANDARD\"}}} \r\n2.1.5 :045 > RIGHT_AWS_S3.delete('test-bucket/test.txt')\r\n => \"\" \r\n2.1.5 :046 > RIGHT_AWS_S3.get('test-bucket/test.txt')\r\nRightScale::CloudApi::HttpError: 404: NoSuchKey: The specified key does not exist. (RequestID: 8E040184850CD732)\r\n\r\nSo it's there, I can do everything, but I can't get to the headers.\r\n\r\nAny help is appreciated.  I really like this interface and the fact that it can be used in a threaded environment."},"comment":{"url":"https://api.github.com/repos/rightscale/right_aws_api/issues/comments/70439920","html_url":"https://github.com/rightscale/right_aws_api/issues/16#issuecomment-70439920","issue_url":"https://api.github.com/repos/rightscale/right_aws_api/issues/16","id":70439920,"user":{"login":"mdchaney","id":25986,"avatar_url":"https://avatars.githubusercontent.com/u/25986?v=3","gravatar_id":"","url":"https://api.github.com/users/mdchaney","html_url":"https://github.com/mdchaney","followers_url":"https://api.github.com/users/mdchaney/followers","following_url":"https://api.github.com/users/mdchaney/following{/other_user}","gists_url":"https://api.github.com/users/mdchaney/gists{/gist_id}","starred_url":"https://api.github.com/users/mdchaney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdchaney/subscriptions","organizations_url":"https://api.github.com/users/mdchaney/orgs","repos_url":"https://api.github.com/users/mdchaney/repos","events_url":"https://api.github.com/users/mdchaney/events{/privacy}","received_events_url":"https://api.github.com/users/mdchaney/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T02:38:17Z","updated_at":"2015-01-19T02:38:17Z","body":"Thank you!"}}