--- moodle/admin/langimport.php 2007-02-15 05:10:59.000000000 +0000 +++ public_html/admin/langimport.php 2007-02-24 22:37:36.000000000 +0000 @@ -368,13 +368,16 @@ return false; //failed } fputs($proxy_fp, "GET $url HTTP/1.0\r\nHost: $CFG->proxyhost\r\n\r\n"); - $i = 0; - while(!feof($proxy_fp)) { + $end_of_headers = 0; + + while(!feof($proxy_fp)) { $string = fgets($proxy_fp, 1024); - if ($i > 11) { //12 lines of info skipped + if(!$end_of_headers){ + // A new line inidcactes end of http headers.. + $end_of_headers = ($string == "\r\n" ? 1 : 0); + }else{ $availablelangs[] = split(',', $string); } - $i++; } fclose($proxy_fp);