I try to use HttpURLConnection to read shoutcast metadata. Some shoutcast server retry non-HTTP header:
qty:~ qrtt1$ curl 'http://72.13.86.203:8000/'
ICY 200 OK
icy-notice1:<BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2:SHOUTcast Distributed Network Audio Server/win32 v1.9.8<BR>
icy-name:VCY America - Teaching, Talk, and Sacred Music
icy-genre:Christian Sacred Talk
icy-url:http://www.vcyamerica.org
content-type:audio/mpeg
icy-pub:1
icy-br:64
The first line is ICY 200 OK, so HttpURLConnection don't parse it and no HTTP 200 OK will become the parse error. Is any way to customize HttpURLConnection ?
If it is impossible, I will write the code from Socket.