http error : "malformed status code"

285 views
Skip to first unread message

Daniel

unread,
Feb 25, 2010, 7:42:58 PM2/25/10
to golang-nuts

I'm receiving the following error when attempting to perform an
http.Get request on site hosted on my own hardware:

Get http://www.tigerwalk.info: malformed HTTP status code "version=
\"1.0\"".

Here's the code I used to generate that error:

...
resp, _, err := http.Get( flag.Arg( 0 ) );
if err != nil {
err_str := fmt.Sprintf( "%s", err );
die( err_str );
}
...

I can correctly receive web pages from other sites so I would have to
guess that my code is correct. Any suggestions?

-Daniel

Russ Cox

unread,
Feb 25, 2010, 10:36:19 PM2/25/10
to Daniel, golang-nuts
> I can correctly receive web pages from other sites so I would have to
> guess that my code is correct.  Any suggestions?

Try

hg pull
hg update 757326e06e44

and then re-run all.bash.

We fixed a couple bugs in the http package recently,
and one of them would explain this.

Russ

Daniel

unread,
Feb 26, 2010, 12:48:12 PM2/26/10
to golang-nuts

>
> We fixed a couple bugs in the http package recently,
> and one of them would explain this.
>

Thanks. That solved the problem. It would be great if GO could
handle https requests as easily.

-Daniel

Reply all
Reply to author
Forward
0 new messages