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

Compatibility problem with lighttpd due to 'Expect: 100-continue" header

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      In some configurations Moodle Networking will break on lighttpd servers. This is due to a bug in lighttpd, which does not correctly handle 'Expect' headers. The server will return a 417 error (note that mnet could probably use a bit more error checking), failing to return the public key from the remote site.

      The fix seems to be to suppress the header, thus...

      curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: text/xml charset=UTF-8","Expect:"));

      ...in the list of options in the mnet_get_public_key function in mnet/lib.php.

      I really need to test this more extensively on non-lighttpd servers, but so far it doesn't seem to break anything. If it's ok, I'd like to just include it so that it works properly for lighttpd.

        Attachments

          Activity

            People

            Assignee:
            donal@catalyst.net.nz Donal McMullan
            Reporter:
            howardsmiller Howard Miller
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: