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

Problem recognizing a local server using debian 12 apache #5

Open
hugleo opened this issue Nov 18, 2023 · 1 comment
Open

Problem recognizing a local server using debian 12 apache #5

hugleo opened this issue Nov 18, 2023 · 1 comment

Comments

@hugleo
Copy link

hugleo commented Nov 18, 2023

Facing problems with Speedtest-desktop detecting my local host server when using apache (perhaps the problem is only with new apache versions).
The error occurs when speedtest-desktop attempts to request the empty.php file, resulting in a "400 Bad Request" error.

I attempted to mimic the speedtest-desktop request using curl and occur the same error.

curl -X GET \
     -H "GET /empty.php HTTP/1.1\r\n" \
     -H "Host: 192.168.0.1\r\n" \
     -H "User-Agent: Librespeed-Desktop/1.0\r\n" \
     -H "Connection: keep-alive\r\n" \
     -H "Accept-Encoding: identity\r\n" \
     -H "Accept-Language: en_US\r\n" \
     http://192.168.0.1/empty.php

The issue was due to the \r\n characters at the end of the hostname in the "Host" header.

I've changed the curl command as follows:

curl -X GET \
     -H "GET /empty.php HTTP/1.1\r\n" \
     -H "Host: 192.168.0.1" \
     -H "User-Agent: Librespeed-Desktop/1.0\r\n" \
     -H "Connection: keep-alive\r\n" \
     -H "Accept-Encoding: identity\r\n" \
     -H "Accept-Language: en_US\r\n" \
     http://192.168.0.1/empty.php

This modification allowed the request to work successfully.

Don't know if is a problem with Speedtest-desktop or apache.

Currently I have switched to using Nginx and everything is working normally.

@SudoDios
Copy link
Collaborator

Hello.
thank you for report this issue.
speedtest-desktop uses exactly the same core library as speedtest-android.
Is this problem in the Android version as well ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants