Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-79341

core\filelib_test test curl useragent fails if the request uses http2 instead of http

XMLWordPrintable

      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.

       

            pholden Paul Holden
            devinefran Francis Devine
            Carlos Castillo Carlos Castillo
            Ilya Tregubov Ilya Tregubov
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 25 minutes
                1h 25m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.