-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.5
-
MOODLE_401_STABLE
-
MOODLE_401_STABLE, MOODLE_402_STABLE
-
MDL-79341-401 -
- Covered by automated tests (PHPUnit)
If the filelib tests get a response via http2 instead of http, the core filelib test fails as the response returned is slightly different.
1) core\filelib_test::test_curl_useragent |
Failed asserting that two strings are identical.
|
— Expected
|
+++ Actual
|
@@ @@
|
-'200 OK' |
+'200 ' |
You can reproduce this via curl by forcing a specific http protocol
Default: (http2)
$ curl -I https://download.moodle.org/unittest/test.html |
HTTP/2 200 |
date: Mon, 21 Aug 2023 23:26:38 GMT |
http1.1
curl --http1.1 -I https://download.moodle.org/unittest/test.html |
HTTP/1.1 200 OK |
Date: Mon, 21 Aug 2023 23:27:08 GMT |
|
I'm not sure if this is related to cloudflare swapping a preferred default or a curl behaviour change that has finally filtered into the LMS.
As a workaround you can host your own version of the external test web docker and make sure it only returns http1.1 protocol responses.