geopython / GeoHealthCheck

Service Status and QoS Checker for OGC Web Services
https://geohealthcheck.org
MIT License
83 stars 71 forks source link

POST requests fail with resources requiring authentication #459

Open PedroVenancio opened 11 months ago

PedroVenancio commented 11 months ago

Describe the bug

Configuring an 'HTTP POST Resource URL with body' test on a WMS with basic authentication, it always fail with an error 401:

    {
      "checks": [
        {
          "check_id": 381,
          "class": "GeoHealthCheck.plugins.check.checks.HttpStatusNoError",
          "message": "HTTP Error status=401",
          "name": "HTTP status should not be errored",
          "response_time": "0.9",
          "success": false
        }
      ],
      "class": "GeoHealthCheck.plugins.probe.http.HttpPost",
      "message": "HTTP Error status=401",
      "name": "HTTP POST Resource URL with body",
      "probe_id": 139,
      "response_time": "0.288622",
      "success": false
    }

This just happen when the resource requires authentication, so it seems POST requests does not send the authentication header.

Context (please complete the following information):

justb4 commented 4 months ago

@PedroVenancio should be fixed, please test and close issue. Sorry for taking so long!