Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect identification and reporting of HTTP Redirection #3721

Closed
5 tasks done
piersoh opened this issue Jul 30, 2021 · 3 comments
Closed
5 tasks done

Incorrect identification and reporting of HTTP Redirection #3721

piersoh opened this issue Jul 30, 2021 · 3 comments
Labels
Bug stale To be used by automatic issue staling and closing to indicate that this issue is about to be closed

Comments

@piersoh
Copy link
Contributor

piersoh commented Jul 30, 2021

Environment
  • Link to playable MPD file:
  • Dash.js version: dash.js since 2016
  • Browser name/version: Any
  • OS name/version: Any
Steps to reproduce
  1. Load MPD with Metrics Reporting enabled
  2. Activate CMCD
Observed behavior
  1. Dash.js incorrectly identifies all requests as "redirected" here:
    if (actualurl && (actualurl !== url)) {
  • This is fixed by Set response.url to modifiedUrl #3720 so that the "modifiedUrl" is passed on so it is firstly correctly reported and secondly so it no longer identifies it as "redirect".
  1. It correctly logs two HttpList entries (if enabled)
  2. It incorrectly generates a C03 for every "redirected" request
  • This due to the fact that null is passed as the status to the second addHttpRequest() call, which leads to an error report. Though a null status is currently only caught by accident (Fixed in Explicitly match null status #3722).
Expected behavior

This then leads a question as to how to correctly identify and handle redirects

  • With XHR it was only possible to compare the actualurl with the url, whereas with Fetch there is an explicit parameter (response.redirected) which indicates that redirection has occured. But in both cases the actual HTTP redirection response code is unknown so it's not clear what status to report either:
    • one just generates a second [largely blank] HttpList as is done now
    • Or the second HttpList report is just dropped and the client only adds the actualurl to reports when it detects a redirection so a logging server can infer that from the presence of actualurl. DVB Spec says actualurl only needs to be reported if different from url.
@piersoh piersoh added the Bug label Jul 30, 2021
@dsilhavy dsilhavy added this to the 4.1.0 milestone Aug 4, 2021
@dsilhavy dsilhavy modified the milestones: 4.1.0, 4.1.1 Sep 15, 2021
@dsilhavy dsilhavy modified the milestones: 4.2.0, 4.3.0 Nov 19, 2021
@dsilhavy
Copy link
Collaborator

@piersoh Thanks for reporting this. Is this something you can look into further? I would prefer the second approach you described above. Adding the actualurl in case there was a redirect.

@dsilhavy dsilhavy modified the milestones: 4.2.1, 4.3.0 Dec 20, 2021
@dsilhavy dsilhavy removed this from the 4.3.0 milestone Feb 11, 2022
@stale
Copy link

stale bot commented Jul 11, 2022

This issue has been automatically marked as stale because it has not had recent activity. However, it might still be relevant so please leave a short comment if it should remain open. Otherwise the issue will be closed automatically after two weeks. Thank you for your contributions.

@stale stale bot added the stale To be used by automatic issue staling and closing to indicate that this issue is about to be closed label Jul 11, 2022
@stale
Copy link

stale bot commented Jul 26, 2022

This issue has been automatically closed because no further activity occurred. If you think this issue is still relevant please reopen it or contact @dsilhavy. Thank you for your contributions.

@stale stale bot closed this as completed Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug stale To be used by automatic issue staling and closing to indicate that this issue is about to be closed
Projects
None yet
Development

No branches or pull requests

2 participants