Fixing class loading for HttpResponse classes, and making possible to pass plugin HttpResponse classes too

This commit is contained in:
Jose Lorenzo Rodriguez 2011-04-10 16:57:44 -04:30
parent 0a1f9d17c3
commit c83a396eb4

View file

@ -363,7 +363,9 @@ class HttpSocket extends CakeSocket {
$this->disconnect();
}
if (!App::import('Lib', $this->responseClass)) {
list($plugin, $responseClass) = pluginSplit($this->responseClass, true);
App::uses($this->responseClass, $plugin . 'Network/Http');
if (!class_exists($responseClass)) {
throw new SocketException(__d('cake_dev', 'Class %s not found.', $this->responseClass));
}
$responseClass = $this->responseClass;