#2 better header analysis
This commit is contained in:
parent
cf916f6b8b
commit
6b37eaf919
1 changed files with 4 additions and 1 deletions
|
@ -78,7 +78,10 @@ function hook_shaargem_render_editlink($data)
|
||||||
} else {
|
} else {
|
||||||
fwrite($fp, $data['link']['url']."\r\n");
|
fwrite($fp, $data['link']['url']."\r\n");
|
||||||
$header = fgets($fp);
|
$header = fgets($fp);
|
||||||
error_log("header:".$header);
|
$ret = preg_match(",^(\d\d) (.*)\r\n$,", $header, $headers);
|
||||||
|
$status = $headers[1];
|
||||||
|
$meta = $headers[2];
|
||||||
|
error_log("status:".$status.", meta:".$meta);
|
||||||
if (strstr($header, "20 text/gemini"))
|
if (strstr($header, "20 text/gemini"))
|
||||||
{
|
{
|
||||||
$nblines = 1;
|
$nblines = 1;
|
||||||
|
|
Loading…
Reference in a new issue