Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: HaikuArchives/StreamRadio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4cc87f8b4499
Choose a base ref
...
head repository: HaikuArchives/StreamRadio
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c6a1879eb3f6
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 19, 2021

  1. Check if Shoutcast URL is valid

    Only process a pasted Shoutcast URL if it's a valid URL.
    Fixes #43
    Humdinger committed Nov 19, 2021
    Copy the full SHA
    c6a1879 View commit details
Showing with 4 additions and 1 deletion.
  1. +4 −1 Station.cpp
5 changes: 4 additions & 1 deletion Station.cpp
Original file line number Diff line number Diff line change
@@ -578,12 +578,15 @@ Station::RegFind(const char* text, const char* pattern)
Station*
Station::LoadIndirectUrl(BString& shoutCastUrl)
{
BUrl url(shoutCastUrl);
if (!url.IsValid())
return NULL;

status_t status;
const char* patternTitle = "<title[^>]*>(.*?)</title[^>]*>";
const char* patternIcon
= "<link\\s*rel=\"shortcut icon\"\\s*href=\"([^\"]*?)\".*?";

BUrl url(shoutCastUrl);
BString contentType("*/*");

BMallocIO* dataIO = HttpUtils::GetAll(url, NULL, 10000, &contentType, 2000);