Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

411 http error on any request #53

Closed
a-urth opened this issue Jul 9, 2014 · 5 comments
Closed

411 http error on any request #53

a-urth opened this issue Jul 9, 2014 · 5 comments

Comments

@a-urth
Copy link

a-urth commented Jul 9, 2014

Ok, guys, i'm trying something like this

resp, err := goreq.Request{Uri: "http://www.google.com"}.Do()
if err != nil {
log.Fatalln(err)
}
fmt.Printf("status - %#v", resp.StatusCode)

and status code is always 411. What could be the problem?

@hoffoo
Copy link

hoffoo commented Jul 9, 2014

Besides that the site is responding with 411? Are you behind some kind of proxy/firewall?

@marcosnils
Copy link
Member

@warik looking at your example I've found a bug in goreq which caused some requests to fail. The bug has been fixed in 2cb507c

Can you please run your test again and update the issue as necessary?.

Thanks

@a-urth
Copy link
Author

a-urth commented Jul 10, 2014

I got latest version - no, still 411.
Yes, I'm under firewall, and using net/http i have no problems doing requests.

@marcosnils
Copy link
Member

Andrei any chance you can print the response headers as well as the body?

Thanks

sent from mobile
El jul 10, 2014 12:00 p.m., "Andrei Ursulenko" notifications@github.com
escribió:

I got latest version - no still 411.
Yes, I'm under firewall, and using net/http i have no problems doing
requests.


Reply to this email directly or view it on GitHub
#53 (comment).

@a-urth
Copy link
Author

a-urth commented Jul 10, 2014

Ok, I'm very sorry - Your fix solved the problem, my test were incorrect.
Thanks a lot.

@a-urth a-urth closed this as completed Jul 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants