Commit graph

93 commits

Author SHA1 Message Date
marcel1702
0603db7b37
Don't force the IE11 upload workaround on Safari (#847)
* Stop forcing the IE11 upload workaround on Safari via user agent sniffing

The upload test reported low and unstable numbers on Safari (macOS and
iOS) while the download test was correct.

Cause: the "start" handler in speedtest_worker.js matched every Safari
user agent and set settings.forceIE11Workaround = true. In ulTest() that
flag selects a fundamentally different, less accurate measurement path:
instead of sending one xhr_ul_blob_megabytes blob (20 MB by default) and
accumulating event.loaded from upload.onprogress, it sends a stream of
256 KB requests and adds a fixed 256 KB to totLoaded on each onload.
Progress is therefore quantised to whole requests and each request pays
a full round trip before the next one starts, so on fast or high-latency
links the measured speed is both too low and noisy.

The workaround is not needed. Its comment claims it is only required for
MPOT, but the block never checked settings.mpot. The same block also
excludes crios and fxios, which on iOS run the very same WebKit
networking stack as Safari, so the user agent test cannot have been
guarding an engine-level bug in the first place. Current WebKit
implements xhr.upload.onprogress, and the existing feature detection in
ulTest() (the try/catch that probes xhr.upload.onprogress) already
selects the workaround for browsers that genuinely lack it, without
sniffing.

Changes:
- Remove the Safari user agent block. Safari now takes the regular
  upload path, the same one Chrome and Firefox on iOS already took.
- Guard the Edge and PlayStation 4 blocks with
  typeof s.forceIE11Workaround === "undefined", matching how the other
  quirks avoid clobbering explicitly passed settings. Previously an
  explicit forceIE11Workaround: false in the start command was silently
  overwritten, so the workaround was not switchable from outside the
  worker. Default behaviour for those browsers is unchanged.
- Add tests/e2e/worker-browser-quirks.spec.js, which loads the worker
  under spoofed user agents and asserts the resolved settings.
- Update doc.md so Safari is no longer listed as affected.

The Edge and PlayStation 4 blocks are deliberately left outside the
enable_quirks condition: those browsers have no working
upload.onprogress, so running them with enable_quirks: false would
report 0 or Fail rather than a less precise number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1bUKsok59shM69PwLMMRM

* docs: describe both detection paths for the IE11 upload workaround

The previous wording claimed affected browsers are detected by checking
whether xhr.upload is usable "not by sniffing the user agent", but Edge
and the PlayStation 4 browser are still matched by user agent regex.
Both mechanisms exist and for different reasons: feature detection only
sees a missing xhr.upload object, while those two expose the object and
simply never fire its events.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1bUKsok59shM69PwLMMRM

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-12 12:00:48 +02:00
EmanuelPeixoto
397308de03 fix upload race: use captured x in onload, remove upload.onload restart
- xhr.onload now owns the complete lifecycle: checks x.status on
  the captured local variable, restarts only on 2xx.
- xhr.upload.onload no longer calls testStream() to avoid race
  with xhr.onload overwriting xhr[i] before status is read.
- xhr.upload.onerror also uses the captured x for consistency.
2026-07-28 16:10:41 -03:00
EmanuelPeixoto
2afc380e19 fix upload: check HTTP status in xhr.onload, expand IIS docs
- speedtest_worker.js: moved HTTP status check from xhr.upload.onload
  (body sent, response may not be available) to xhr.onload
  (full HTTP transaction complete, xhr.status is reliable).
- doc.md: added full IIS web.config example with maxAllowedContentLength.
2026-07-23 17:50:51 -03:00
EmanuelPeixoto
1b3c0ac9c4 fix upload: check HTTP status in onload, document server body size limit
- speedtest_worker.js: xhr.upload.onload now checks xhr.status
  before restarting the upload stream. Non-2xx responses (e.g.
  HTTP 413 from undersized client_max_body_size) are treated as
  failures instead of inflating upload speed measurements.

- doc.md: added explicit nginx/Apache/IIS configuration examples
  for client_max_body_size / LimitRequestBody to prevent HTTP 413
  errors on the 20MB upload test blobs.
2026-07-22 14:51:45 -03:00
HedgehogInTheCPP
2b53bbae54
Changed var to the let/const because it's completely supported by IE11 and all other browsers since 2015. (#656) 2024-08-16 18:07:26 +00:00
sstidl
e5f54fbd78
Release 5.3.0 (#587)
* Update README.md

Added simple manual instructions

* Link to docker documentation

* Add basic docker compose example

* add descriptive alt-text to GIF

* Fix some typos and formatting

* Updated Docker to use php8.2-apache as the upstream image.

* Clean up apt lists after installation in Dockerfile

* Update Dockerfile

Co-authored-by: Quentame <polletquentin74@me.com>

* fix typo

* doc: sqlite db persistance explained

* Create docker-publish.yml

* Update docker-publish.yml

* Update docker-publish.yml

* fix action

* switch docker image location

* without image signing

* remove signing

* switch units to Mbit/s

* move examples to folder

* fix ipinfo parsing

* fix regression on getIpinfo

* removed trailing whitespaces

* integrate ios favicon

closes #400

* set single-server-full as index

---------

Co-authored-by: Les W <30345058+leswaters@users.noreply.github.com>
Co-authored-by: bt90 <btom1990@googlemail.com>
Co-authored-by: An | Anton Röhm <18481195+AnTheMaker@users.noreply.github.com>
Co-authored-by: 0kyn <0kyn.dev@gmail.com>
Co-authored-by: Marc Zampetti <zampettim@users.noreply.github.com>
Co-authored-by: Peter Dave Hello <hsu@peterdavehello.org>
Co-authored-by: Quentame <polletquentin74@me.com>
Co-authored-by: Stefan STIDL <stefan.stidl@ffg.at>
2023-11-26 12:46:27 +01:00
dosse91
8be8aba5ed Fixed typo in results/index.php 2021-04-13 10:27:36 +02:00
dosse91
a8af6ba700 Improved settings behavior 2020-10-24 09:32:39 +02:00
dosse91
e36de9a6ce Improved auto test duration formula 2020-09-27 20:18:01 +02:00
kodaihirano
6fbe21f2f7
use delay in ultest (#319)
#318
2020-05-04 13:38:29 +02:00
dosse91
5d9b44c77b Fixed a bug where a variable wasn't initialized if enable_quirks was disabled 2020-02-17 18:49:09 +01:00
dosse91
cfd0eb0145 Removed Firefox xhr_ulMultistream browser quirk because it was outdated 2019-10-12 08:18:37 +02:00
dosse91
c95cfb10be Fixed a typo 2019-10-07 07:56:44 +02:00
dosse91
bd7ec37350 Renamed to LibreSpeed 2019-09-25 08:23:53 +02:00
dosse91
26009057f5 Changed ping estimation to match android app 2019-09-24 09:38:17 +02:00
dosse91
1f117a4c5c Fixed minor telemetry bugs 2019-08-29 21:22:26 +02:00
dosse91
c3e576ddba Major project restructuring and unification with mpot branch 2019-06-30 07:03:06 +02:00
adolfintel
54605f0aa5 Release 4.7.2 2019-04-20 08:51:01 +02:00
adolfintel
91ddb8686d Minor improvement to ping test and quirks 2019-04-13 21:29:30 +02:00
adolfintel
520a2757d5 Updated quirks 2019-04-10 07:22:41 +02:00
adolfintel
8ac704066e Added try-catches in upload test for XHR headers 2019-02-12 18:45:27 +01:00
André Luiz dos Santos
f7733a74ab Compatibility fix for Caddy web server
Add Content-Type: application/octet-stream for upload test.
This fixes a compatibility issue with Caddy web server
2019-02-12 18:43:18 +01:00
adolfintel
1bcf6681fd Added quirk for PS4 browser 2019-02-03 12:31:59 +01:00
adolfintel
963778e4c7 Minor fix in telemetry 2019-01-31 12:43:45 +01:00
adolfintel
513ddc5905 Simplified IE11 upload test 2019-01-31 12:27:29 +01:00
adolfintel
dc2dc1e5a1 Bumped version to 4.7.1 2019-01-30 19:11:03 +01:00
adolfintel
565f3d1174 Updated doc.md 2019-01-30 12:30:59 +01:00
adolfintel
7b1d8995e1 Implemented ID obfuscation in telemetry.php and results/index.php 2019-01-30 10:16:28 +01:00
adolfintel
d08a863d83 Improved JS formatting 2019-01-25 09:17:32 +01:00
adolfintel
0ffe1c483b Removed empty line 2018-12-15 08:18:17 +01:00
adolfintel
6f25024ea2 My stupidity is beyond comprehension 2018-12-09 08:14:20 +01:00
adolfintel
f5a275badc My stupidity is beyond comprehension 2018-12-09 08:10:43 +01:00
adolfintel
ee19a95535 I'm stupid 2018-12-08 09:35:00 +01:00
adolfintel
b9bccc3ed0 Tweaked the formula again 2018-12-08 09:04:08 +01:00
adolfintel
20d3be4ac3 Fixed a typo in telemetry 2018-12-08 08:31:23 +01:00
adolfintel
e444353161 Increased time bonus 2018-12-08 08:00:59 +01:00
adolfintel
856b6c4488 Increased speed bonus 2018-12-07 19:00:45 +01:00
adolfintel
a544810c3a Telemetry stuff 2018-12-07 17:59:29 +01:00
adolfintel
153e313a53 Telemetry stuff 2018-12-07 17:56:28 +01:00
adolfintel
a869de02a2 Implemented automatic test duration; Improved telemetry 2018-12-07 16:29:12 +01:00
adolfintel
4b54e4b388 Minor improvement to jitter test 2018-09-20 15:43:22 +02:00
adolfintel
228d137a5a Fixed a typo 2018-09-20 15:00:33 +02:00
adolfintel
b509c832e2 Minor improvement to ping test; Bumped version to 4.6.2 2018-09-20 14:55:54 +02:00
adolfintel
02f29a76ff Fixed atrocious typo 2018-08-08 09:03:06 +02:00
adolfintel
0954c6a6ac Speedtest worker now outputs status as JSON for easier parsing; Removed partial CSV implementation; Updated examples and documentation 2018-08-08 08:57:24 +02:00
adolfintel
0ce73a7e6c Added telemetry_extra field in the speedtest settings. This can be used to pass data from the frontend to the worker that you want to be stored in the database 2018-08-07 11:55:25 +02:00
adolfintel
5446e98933 Added test result sharing; Added stats page; Improved project structure; Minor bug fixes 2018-08-06 18:15:52 +02:00
adolfintel
cfbbfa3e58 Output from getIP (IP and ISP info) is now stored in the results database 2018-08-05 08:12:07 +02:00
adolfintel
c17d58a614 Improved random data generation for upload test; Updated doc.md 2018-07-13 22:47:24 +02:00
dosse
e0dfcae1fc Introduced fix for broken upload test in Chromium-based mobile browsers (since version 65) 2018-03-21 17:01:44 +01:00