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.
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).