Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Amazon S3 is broken #121

Closed
indutny opened this issue May 6, 2013 · 9 comments · Fixed by #122 or #137
Closed

Amazon S3 is broken #121

indutny opened this issue May 6, 2013 · 9 comments · Fixed by #122 or #137

Comments

@indutny
Copy link
Contributor

indutny commented May 6, 2013

After this d96f7b1.

@indutny
Copy link
Contributor Author

indutny commented May 6, 2013

More info: signature fails because options.path is always undefined.

@kenperkins
Copy link
Member

This is a good bug. Comparing the working branch (0.6.15) against master, I notice that the URL that the client actually creates a PUT against:

https://kptest2.s3.amazonaws.com/Vagrantfile

Is actually different than the URL that's used in signing:

  'PUT',
  '\n',
  '',
  '\n',
  'application/octet-stream',
  '\n',
  'Mon, 06 May 2013 16:48:32 GMT',
  '\n',
  '/kptest2/Vagrantfile'

I'll research into why amazon does this, but for now, I'll need to pass around the signingUrl for amazon.

@kenperkins
Copy link
Member

This branch fixes the change (as a quick validation) but I'm not convinced I want this approach (where you pollute the official request options)

https://github.com/rackspace/pkgcloud/compare/awsFix

I'm going to think about a refactor for the "before" options to use a more first class object for passing around the input options and generating the real request options.

@cronopio
Copy link
Contributor

cronopio commented May 6, 2013

@indutny a pull request to fix this was merged at master, can you test please and confirm that we can close this?

@indutny
Copy link
Contributor Author

indutny commented May 7, 2013

Doesn't seem to be working for me, though, it got a bit better now .createContainer() works, but .upload() is still failing!

@kenperkins
Copy link
Member

Can you provide some sample code and details (node version, etc)? I have upload and createContainer both working for Amazon.

@indutny
Copy link
Contributor Author

indutny commented May 7, 2013

You can try it there: https://github.com/indutny/glacebox

@kenperkins
Copy link
Member

Are you able to narrow it down? I don't really have time to look into your project to find out what's not working.

I can validate that a naked pkgcloud (v0.7.1) upload works:

var pkgcloud = require('pkgcloud');

var client = pkgcloud.providers.amazon.storage.createClient({
    keyId: 'redacted',
    key: 'redacted'
});

client.upload({
    container: 'kptest2',
    remote: 'GoogleVoiceAndVideoSetup.dmg',
    local: '/Users/me/Downloads/GoogleVoiceAndVideoSetup.dmg'
}, function(err, result) {
    console.dir(err);
    console.dir(result);
});

@kenperkins
Copy link
Member

Fixed by #137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants