Browse Source

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

Jose Lorenzo Rodriguez 15 years ago
parent
commit
c83a396eb4
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lib/Cake/Network/Http/HttpSocket.php

+ 3 - 1
lib/Cake/Network/Http/HttpSocket.php

@@ -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;