Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.9
-
None
-
None
-
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.