Thanks to visit codestin.com
Credit goes to github.com

Skip to content

session: move from http to https as default scheme#4068

Merged
gravyboat merged 1 commit into
streamlink:masterfrom
bastimeyer:session/https-as-default
Oct 3, 2021
Merged

session: move from http to https as default scheme#4068
gravyboat merged 1 commit into
streamlink:masterfrom
bastimeyer:session/https-as-default

Conversation

@bastimeyer

@bastimeyer bastimeyer commented Oct 3, 2021

Copy link
Copy Markdown
Member

Apply the https scheme to all input URLs if the scheme is missing:

  • session:
    • Session.resolve_url()
    • session option http-proxy (--http-proxy CLI argument)
  • plugins.akamaihd: akamaihd://URL
  • plugins.dash: dash://URL or URL.mpd
  • plugins.hds: hds://URL or URL.f4m
  • plugins.hls: hls://URL or URL.m3u8
  • plugins.http: httpstream://URL

Regular http URLs (non-https/TLS) will need to be set explicitly now.

Also

  • update/fix test_session
  • refactor/fix test_dash
  • refactor/fix test_stream

Resolves #4047
Follow-up of #4053

  • Does this introduce a breaking change?
    This changes the way user input is handled. In almost all cases, this simply avoids the initial insecure http request when no scheme was defined, which then gets redirected by the server to a secure connection, so no breaking change here. For sites though which don't support https/TLS, setting the http scheme is now mandatory, which is the reason why I'm not sure if this is a breaking change. It probably is...
  • Does updating the http-proxy option make sense?
    If we change the stream URL input, then we should change this too, IMO.
    Also, having two separate options for http and https is stupid and we should merge this at some point.

Apply the https scheme to all input URLs if the scheme is missing:
- session:
  - Session.resolve_url()
  - session option `http-proxy` (`--http-proxy` CLI argument)
- plugins.akamaihd: `akamaihd://URL`
- plugins.dash: `dash://URL` or `URL.mpd`
- plugins.hds: `hds://URL` or `URL.f4m`
- plugins.hls: `hls://URL` or `URL.m3u8`
- plugins.http: `httpstream://URL`

Regular http URLs (non-https/TLS) will need to be set explicitly now.

Also
- update/fix test_session
- refactor/fix test_dash
- refactor/fix test_stream
@bastimeyer bastimeyer force-pushed the session/https-as-default branch from bbf80ed to fd33e2b Compare October 3, 2021 12:58
@gravyboat

gravyboat commented Oct 3, 2021

Copy link
Copy Markdown
Member

As much as I hate to say it I do think we should consider this a breaking change. I don't see any reason not to merge this or to delay though, we have no obligation to avoid introducing breaking changes. If a site doesn't support HTTPS they're not worth supporting so I don't care if we break those sites.

@gravyboat gravyboat merged commit e255b96 into streamlink:master Oct 3, 2021
@bastimeyer bastimeyer deleted the session/https-as-default branch October 3, 2021 18:30
@bastimeyer

Copy link
Copy Markdown
Member Author

We're not breaking sites/plugins, we're breaking user inputs. Anything non-https does still work if http:// gets set explicitly.

I would've preferred waiting a bit before merging, but it's too late now.

Since this is a breaking change, we should see what we can include in the next release that will be a breaking change as well, to avoid having lots of unnecessary major version bumps. It doesn't have to be everything marked as deprecated though (considering the time of the deprecation)

@gravyboat

Copy link
Copy Markdown
Member

@bastimeyer My bad I didn't realize from the tone of your comment that you wanted to wait and thought you were noting it was a breaking change that should be merged any way.

Billy2011 added a commit to Billy2011/streamlink-27 that referenced this pull request Oct 4, 2021
…k#4068)

Apply the https scheme to all input URLs if the scheme is missing:
- session:
  - Session.resolve_url()
  - session option `http-proxy` (`--http-proxy` CLI argument)
- plugins.akamaihd: `akamaihd://URL`
- plugins.dash: `dash://URL` or `URL.mpd`
- plugins.hds: `hds://URL` or `URL.f4m`
- plugins.hls: `hls://URL` or `URL.m3u8`
- plugins.http: `httpstream://URL`

Regular http URLs (non-https/TLS) will need to be set explicitly now.

Also
- update/fix test_session
- refactor/fix test_dash
- refactor/fix test_stream
@bastimeyer bastimeyer mentioned this pull request Nov 3, 2021
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make scheme-less input URLs use HTTPS instead of HTTP

2 participants