Skip to content
This repository has been archived by the owner on Dec 8, 2024. It is now read-only.

Append Args if playlist already has query params #31

Merged
merged 1 commit into from
Oct 17, 2015
Merged

Append Args if playlist already has query params #31

merged 1 commit into from
Oct 17, 2015

Conversation

bradleyfalzon
Copy link
Collaborator

Previously media playlists were assumed to have no query parameters when
encoding a master manifest with Args. This commit first checks if the
URI contains existing params (checks for "?") and if so, appends new
Args with a leading "&", else it will add "?".

Previously media playlists were assumed to have no query parameters when
encoding a master manifest with Args. This commit first checks if the
URI contains existing params (checks for "?") and if so, appends new
Args with a leading "&", else it will add "?".
@bradleyfalzon
Copy link
Collaborator Author

It's also possible to redesign the args checking using Go's net/url package to parse the existing URI, but ultimately the url package is also checking for a ?, so I thought it wouldn't provide any more assistance without completely redesigning this section (and full supporting appending, encoding, per variant params etc).

@grafov grafov added the bug label Oct 17, 2015
grafov added a commit that referenced this pull request Oct 17, 2015
Append Args if playlist already has query params
@grafov grafov merged commit c84e6d9 into grafov:master Oct 17, 2015
@grafov
Copy link
Owner

grafov commented Oct 17, 2015

Probably 'net/url' is more right way but I think your solution is good enough. Merged ok, thank for this fix!

grafov added a commit that referenced this pull request Nov 22, 2016
Append Args if playlist already has query params
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants