Giter Site home page Giter Site logo

Comments (10)

Steffen75 avatar Steffen75 commented on July 28, 2024 1

I found the problem. Safari's console was reporting HTTP errors 405 during the upload due to the static design of OST.

So I added error_page 405 =200 $uri; to the config and now it works.

But what about adding a server side php script for making a real upload to /dev/null as an improvement in a future version. Using PUT should make it rather simple.

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

Nginx will read the post body and pass it to static file. It will get discarded like dev/null.

Yes we can use PHP or any other languages to do the same stuff.

But static design means you don't have to worry about security updates for your programming language.

More secure, easy to deploy, run anywhere all you need is basic web server.

That is why I am able to create Android and iOS apps with the same files that is posted here.

If it does what we need means why should we need a programming language like PHP anyway.

from speed-test.

arekm avatar arekm commented on July 28, 2024

Why 405 response POST entries are taken into account anyway? These are errors and maybe should be shown to user instead of being counted for upload speed.

speedtest-bug-1

(that's from Speed-Test deployed on pfSense http management server)

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

@arekm Some browsers, like Safari, may not trigger the onProgress event if the request completes in under 100 milliseconds. This is a known issue with Safari and Internet Explorer (IE). Therefore, when testing very fast connections, we might not receive the onProgress event, prompting us to calculate it manually using onLoad event. This behavior is only likely to occur if the server is not configured correctly and is generally not encountered in standard use.

from speed-test.

arekm avatar arekm commented on July 28, 2024

I'm using google chrome 122 (and the server isn't configured for speedtest purposes, that's for sure).

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

@arekm Which Server? If that is Nginx check https://github.com/openspeedtest/Nginx-Configuration/blob/main/OpenSpeedTest-Server.conf#L29 If that is not Nginx, Handle /upload and return 200.

from speed-test.

arekm avatar arekm commented on July 28, 2024

Configuration of that server cannot be changed (it's autogenerated nginx config from pfSense software for purposes of pfSense panel management only and speed test is only sneaked into it to be able to test speeds to/from pfSense router).

I'm only mentioning that problem to see if there is a way to better handle 405 error in such "not correctly configured server c" case, instead of showing up crazy results.

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

@arekm Even when the server is configured correctly, Safari at very high speed may not fire the OnProgress event. Otherwise, we would need to drop support for Safari, which is not an option. Unfortunately, I am not aware of a better way to avoid this issue.

from speed-test.

openspeedtest avatar openspeedtest commented on July 28, 2024

@arekm Maybe we can stop the upload process and warn the user if the server returns a 405 (Method Not Allowed) status code.

if (xhr.status === 405) {
    // Handle the 405 error
    console.error("Error: Method Not Allowed (405)");

I will test this, and if possible, I will update the speed test soon.

from speed-test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.