mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-01 22:30:14 +02:00
[contents] Fix parsing of incomplete headers
Response headers may contain fields with no values. Example: "Referrer-Policy: " In this case the current implementation of explode() results in an error because there is no content after ": ". Changing the delimiter to ":" and trimming the value manually fixes that issue.
This commit is contained in:
@@ -323,7 +323,7 @@ function parseResponseHeader($header) {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
list ($key, $value) = explode(':', $line);
|
list ($key, $value) = explode(':', $line);
|
||||||
$header[$key] = $value;
|
$header[$key] = trim($value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user