Skip to content

Problem recognizing a local server using debian 12 apache #5

@hugleo

Description

@hugleo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions