Moodle

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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.

Activity

Hide
Howard Miller added a comment -

http://trac.lighttpd.net/trac/ticket/1017

The bug has actually been fixed, so it could well just be a matter of upgrading lighttpd. However, distros may have the old version (we hit it with Ubuntu 7.10).

Show
Howard Miller added a comment - http://trac.lighttpd.net/trac/ticket/1017 The bug has actually been fixed, so it could well just be a matter of upgrading lighttpd. However, distros may have the old version (we hit it with Ubuntu 7.10).
Hide
Howard Miller added a comment -

Thinking about it, closing my own bug as it's stupid to patch Moodle to fix a known (and fixed) bug in another application. However, as the fix is in the (currently unreleased) 1.5 version of lighttpd, at least this info is here for anybody who has this problem.

Show
Howard Miller added a comment - Thinking about it, closing my own bug as it's stupid to patch Moodle to fix a known (and fixed) bug in another application. However, as the fix is in the (currently unreleased) 1.5 version of lighttpd, at least this info is here for anybody who has this problem.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: