* @var array
*/
public static $mapping = array(
- '/Status_NoAuth.asp' => 'tests/status_noauth-connected.htm'
+ '/Status_NoAuth.asp' => 'tests/status_noauth-connected.htm',
+ '/index_wstatus1.asp' => 'tests/index_wstatus1-connected-excellent.htm'
);
/**
- * Sends the request and returns the response
+ * Sends the request and returns the response.
+ * When the host is three-letter numeric string, it
+ * is used as HTTP response status code. No "proper" content
+ * is returned in that case.
*
* @return HTTP_Request2_Response
*
*/
public function send()
{
+ $host = $this->url->getHost();
+ if (strlen($host) == 3 && is_numeric($host)) {
+ $this->adapter->addResponse(
+ "HTTP/1.0 $host dummy\n\nnothing"
+ );
+ return parent::send();
+ }
+
$path = $this->url->getPath();
if (!isset(self::$mapping[$path])) {
throw new HTTP_Request2_Exception(