Skip to content

Commit a4db616

Browse files
committed
allow all line-break styles for ease of testing
1 parent fea3eb2 commit a4db616

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/IndieWeb/link_rel_parser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// in $h: HTTP headers as a string
1010
// returns: array of rel values as indices to arrays of URLs
1111
function http_rels($h) {
12-
$h = explode("\r\n", preg_replace("/(\r\n|\r|\n)[ \t]+/", " ", $h));
12+
$h = preg_replace("/(\r\n|\r)/", "\n", $h);
13+
$h = explode("\n", preg_replace("/(\n)[ \t]+/", " ", $h));
1314
$rels = array();
1415
foreach ($h as $f) {
1516
if (!strncmp($f, 'X-Pingback: ', 12)) {

0 commit comments

Comments
 (0)