kr / hk

Fast Heroku client
https://hk.heroku.com/
77 stars 6 forks source link

`hk set` returns 411 Length Required #50

Closed bgentry closed 10 years ago

bgentry commented 10 years ago
$ hk set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-c.git
Unexpected error: 411 Length Required
kr commented 10 years ago

JSON request bodies in hk use (currently) a bytes.Reader. Go recently (in version 1.1?) added bytes.Reader to the list of types for which it automatically sets content length. http://godoc.org/net/http?file=request.go#NewRequest

I think that compiling hk with a sufficiently recent version of Go will solve this.

If we're concerned about working with older go versions, we can set content length explicitly in api.go.

kr commented 10 years ago

Can you provide the version of hk (output of git log -1) and version of go (output of go version) you're using?

bgentry commented 10 years ago

Bleh, this is not actually broken. My 2-factor auth token had expired just before I ran this command. I had to go back into the heroku CLI to set it again.

However, I guess the error message was confusing.

$ hk version
0.6