You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In XMLHttpRequest, there are multiple readyStates of interest: 2 (response headers received)and 4 (load finished).
I created a script that checks responseHeaders at readyState 2, and if it indicates support for range requests, I abort the request and restart the request with a much smaller range.
In theory, this works. However, it does not work in GreaseMonkey because it only sets the headers when the request has fully finished:
git blame shows that this logic was already in place in the initial commit of the repo, so I did not discover why the implementation is like this.
This, and the fact that HTTP cookies are not included in the request is the reason why I switched to a full WebExtension for the script. It would still be good to fix the issue in GM though.
The text was updated successfully, but these errors were encountered:
In XMLHttpRequest, there are multiple readyStates of interest: 2 (response headers received)and 4 (load finished).
I created a script that checks responseHeaders at readyState 2, and if it indicates support for range requests, I abort the request and restart the request with a much smaller range.
In theory, this works. However, it does not work in GreaseMonkey because it only sets the headers when the request has fully finished:
greasemonkey/modules/xmlhttprequester.js
Lines 253 to 254 in 3f462ac
git blame shows that this logic was already in place in the initial commit of the repo, so I did not discover why the implementation is like this.
This, and the fact that HTTP cookies are not included in the request is the reason why I switched to a full WebExtension for the script. It would still be good to fix the issue in GM though.
The text was updated successfully, but these errors were encountered: