netdna/netdnarws-ruby

414 Request-URI Too Large

collin opened this issue · 6 comments

When POSTing to the ssl endpoint for zones: http://docs.maxcdn.com/#zones-ssl-api

        cert_data = client.post "/zones/pull/#{owner.cdn_id}/ssl.json", {
          ssl_cert: ENV["DIVSHOT_IO_SSL_CERT"],
          ssl_key: ENV["DIVSHOT_IO_SSL_KEY"],
          ssl_cabundle: DIVSHOT_IO_SSL_CABUNDLE
        }, { :body => true }

Says the request uri is too large, how should I be forming this api call to get a reasonably sized url?

@collin which version of the client are you using?
It has been solved ~7 months ago the issue when POST requests were sending parameters both through the URI and on the BODY.
Also, sending the :body option is not required, as POST request already always set options[:body] = true

I'm on the latest version.

On Mon, Feb 10, 2014 at 7:05 AM, David Litvak Bruno <
notifications@github.com> wrote:

@collin https://github.com/collin which version of the client are you
using?
It has been solved ~10 months ago the issue when POST requests were
sending parameters both through the URI and on the BODY.
Also, sending the :body option is not required, as POST request already
always set options[:body] = true

Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-34628527
.

Also have a discussion running here:
#10

On Mon, Feb 10, 2014 at 1:18 PM, Collin Miller collintmiller@gmail.comwrote:

I'm on the latest version.

On Mon, Feb 10, 2014 at 7:05 AM, David Litvak Bruno <
notifications@github.com> wrote:

@collin https://github.com/collin which version of the client are you
using?
It has been solved ~10 months ago the issue when POST requests were
sending parameters both through the URI and on the BODY.
Also, sending the :body option is not required, as POST request already
always set options[:body] = true

Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-34628527
.

hey @collin we are looking into this.

@collin netdnarws-ruby has been replaced with ruby-maxcdn ( gem install maxcdn ). I don't believe this issue is actually fixed there, but if you have the time to try it, I would like to see the stack trace of the exception you're getting.

You can either reply here, or open this anew at https://github.com/MaxCDN/ruby-maxcdn/issues

Cheers,
Josh

@collin This should be fixed in the maxcdn v0.1.1 gem. See https://rubygems.org/gems/maxcdn or https://github.com/maxcdn/ruby-maxcdn.

I Included an example of the ssl upload code that work in my test here: https://github.com/MaxCDN/ruby-maxcdn#example-ssl-upload

If you're still having issues, it would be really helpful if you'd turn on the new debugging functionality I've added...

max = MaxCDN::Client.new(ALIAS, KEY, SECRET)
max.debug = true
max.post( ... args ...)

And send me the output ... joshua [at] mervine [dot] net, or send it to @jdorfman and he can forward it on to me.

Cheers,
Josh