Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

When creating an object first try to GET it #121

Open
mustela opened this issue Oct 18, 2016 · 2 comments
Open

When creating an object first try to GET it #121

mustela opened this issue Oct 18, 2016 · 2 comments
Labels

Comments

@mustela
Copy link

mustela commented Oct 18, 2016

Guys, I'm trying to create a simple object but when I do it, it first run a GET and of corse since the resource doesn't exists it rise an exception:

s = my_bucket.objects.build "holaaaa/"
s.save
opening connection to my_bucket.s3.amazonaws.com:80...
opened
<- "GET /holaaaa/? HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nDate: Tue, 18 Oct 2016 17:03:03 GMT\r\nAuthorization: AWS xxxxxxx=\r\nHost: my_bucket.s3.amazonaws.com\r\n\r\n"
-> "HTTP/1.1 404 Not Found\r\n"

Is this the expected behavior?

UPDATED: The problem is when you don't set the content of the file.

@qoobaa
Copy link
Owner

qoobaa commented Oct 19, 2016

I haven't used it for a while, so I'm not sure if this is an expected behavior. If you think it is, feel free to create a PR with a test case.

@qoobaa qoobaa added the bug label Oct 19, 2016
@mustela
Copy link
Author

mustela commented Oct 19, 2016

It shouldn't really be the expected behavior, will try to work on a PR. Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants