* @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'
);
*/
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(
}
$parser = new Console_CommandLine();
-$parser->description = 'Tool to control Linksys WRT3g routers';
+$parser->description = "Tool to control Linksys WRT3g routers
+
+Dummy responses can be controlled with the host parameter:
+ A 3-letter numeric host is interpreted as HTTP response code";
$parser->version = '0.0.1';//FIXME: dynamic
$parser->addOption(
'host',