00001 #ifdef TEST 00002 00003 #include "headers.h" 00004 00005 const static string wsCommandString = "ws"; 00006 const static string fetchCommandString = "fetch"; 00007 const static string googleFetchString = "GET http://www.google.com/ HTTP/1.0\n\rAccept: */*\n\rAccept-Language: en-us\n\rCookie: PREF=ID=7aa92f64292b5595:TM=1006413353:LM=1006413353:S=PO8OA49LDXE\n\rUser-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)\n\rHost: www.google.com\n\rProxy-Connection: Keep-Alive\n\r\n\r"; 00008 00009 string 00010 WebServerCommand::getCommandString() { 00011 return wsCommandString; 00012 } 00013 00014 00015 void 00016 WebServerCommand::getHtmlInterface(std::ostream& s) { 00017 s << "<h2>Web Server</h2>"; 00018 beginUl(s); 00019 generateHtmlSubcmd(s, fetchCommandString, "Get Google"); 00020 endUl(s); 00021 } 00022 00023 00024 void 00025 WebServerCommand::run(std::ostream& s) { 00026 if (m_args[1] == fetchCommandString) { 00027 testFetch(s); 00028 } 00029 } 00030 00031 00032 void 00033 WebServerCommand::testFetch(std::ostream& s) { 00034 } 00035 00036 00037 #endif 00038