Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix warnings from file_get_contents() in Xml::build()
Use HttpSocket to get proper exceptions when trying to load XML from remote servers. Fixes #3379
- Loading branch information
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fb275c5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This introduces a small BC as
file_get_contents
follow redirects by default andHttpSocket
doesn't.fb275c5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file_get_contents($input) should probably use the $context (second param) and
connection: close
, though, as HTTP1.1 now leaves it open with this method if not specifically declared as "closing" in the headers creating an overhead of never-closing connections in some cases.fb275c5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file_get_contents() was removed because of shitty error handling, I don't know why we'd add it back. HttpSocket can follow redirects its just a config option.
fb275c5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 689745d