Minor performance improvement to Response.
Now that we have conditional handling of content(), I added a tweak to slightly improve CURL performance.
This commit is contained in:
parent
efff5a1673
commit
7451d92e29
@ -177,12 +177,13 @@ class Response {
|
||||
}
|
||||
}
|
||||
else {
|
||||
while (!feof($this->handle)) {
|
||||
$out .= fread($this->handle, 8192);
|
||||
}
|
||||
// XXX: This works fine with CURL, but will not
|
||||
// work with PHP HTTP Stream Wrapper b/c the
|
||||
// wrapper has a bug that will cause this to
|
||||
// hang.
|
||||
$out = stream_get_contents($this->handle);
|
||||
}
|
||||
|
||||
|
||||
// Should we close or rewind?
|
||||
// Cannot rewind PHP HTTP streams.
|
||||
fclose($this->handle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user