Skip to content
This repository
Browse code

Fix for ignoring Protocol Options in CShoutcastFile::Open.

(something like UserAgent, Referer, etc.)
  • Loading branch information...
commit b6e5b50be5c44222c9c96a6277659f6775b1b250 1 parent d849f9b
SpiritOffice authored July 17, 2013

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  xbmc/filesystem/ShoutcastFile.cpp
2  xbmc/filesystem/ShoutcastFile.cpp
@@ -69,7 +69,7 @@ int64_t CShoutcastFile::GetLength()
69 69
 bool CShoutcastFile::Open(const CURL& url)
70 70
 {
71 71
   CURL url2(url);
72  
-  url2.SetProtocolOptions("noshout=true&Icy-MetaData=1");
  72
+  url2.SetProtocolOptions(url2.GetProtocolOptions()+"&noshout=true&Icy-MetaData=1");
73 73
   url2.SetProtocol("http");
74 74
 
75 75
   bool result=false;

3 notes on commit b6e5b50

Garrett Brown
Collaborator

if url2.GetProtocolOptions() is empty, is it a problem if the protocol options start with "&"? it doesn't create a link like http://xxx?&noshout=... does it?

arnova
Collaborator

Better be safe than sorry I'd say: an extra url2.GetProtocolOptions() ? ... is fairly simple to implement...

SpiritOffice

I allready tested it. if the m_strProtocolOptions is empty, then it just starts with "&". But it doesnt matter, because your url is allready splitted away in another string, and then you have "CUtil::Tokenize(options, array, "&");" in CurlFile.cpp.
It just splits this options string, there is no problem whether you have "&" as your first symbol or not.

Please sign in to comment.
Something went wrong with that request. Please try again.