Skip to content

parseHTTPVersion "slice bounds out of range" #775

@gopherbot

Description

@gopherbot

by cyril.zorin:

What steps will reproduce the problem?
1. Call http.Get("http://89.179.179.5:8040";)

What is the expected output? What do you see instead?

Expected output is not a crash. The actual output is a crash.

The idea here is that the remote server uses the Icecast protocol. The only difference
between it and the HTTP protocol is that the first field of the response status line is 
"ICY" instead of "HTTP".

The first line of parseHTTPVersion says this: "if vers[0:5] != "HTTP/"
{", but vers is "ICY", ergo the slice is out of bounds.

What is your $GOOS?  $GOARCH?

darwin, amd64

Which revision are you using?  (hg identify)
17ded5ad443b tip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions