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,11 +177,12 @@ class Response {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
while (!feof($this->handle)) {
|
// XXX: This works fine with CURL, but will not
|
||||||
$out .= fread($this->handle, 8192);
|
// 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?
|
// Should we close or rewind?
|
||||||
// Cannot rewind PHP HTTP streams.
|
// Cannot rewind PHP HTTP streams.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user