Shoutcast servers basically speak http, with one important difference: they respond to GET
requests with ICY 200 OK
instead of HTTP/1.1 200 OK
.
Go won't have a bar of it, and correctly fails with the error malformed HTTP version "ICY"
.
However I would like to make things work and am wondering what the best approach is. My ideas so far:
- use a custom http.Transport.Proxy to change
ICY
toHTTP/1.1
in-flight - an out of process proxy that does the same thing
- overload
http.ParseHTTPVersion
(but golang doesn't have function overloading) - duplicate the entire http package, just to modify
ParseHTTPVersion
Number 1. seems the most attractive attractive, but I have no idea how to respect the http "scope" and actually modify all responses on a given http version. Is this the kind of thing http.Transport.Proxy
can handle?
Can anyone give me any pointers?