浏览代码

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

Jose Lorenzo Rodriguez 15 年之前
父节点
当前提交
c83a396eb4
共有 1 个文件被更改,包括 3 次插入1 次删除
  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();
 			$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));
 			throw new SocketException(__d('cake_dev', 'Class %s not found.', $this->responseClass));
 		}
 		}
 		$responseClass = $this->responseClass;
 		$responseClass = $this->responseClass;