App-DubiousHTTP
view release on metacpan or search on metacpan
lib/App/DubiousHTTP/Tests.pm view on Meta::CPAN
"Content-type: text/html\r\n".
"Content-length: ".length($html)."\r\n".
"ETag: ".App::DubiousHTTP->VERSION."\r\n".
"\r\n".
$html;
}
sub _auto_static_html { return <<'HTML'; }
<!doctype html>
<meta charset="utf-8">
<style>
body { font-family: Verdana, sans-serif; }
#title { padding: 1em; margin: 1em; border: 1px; border-style: solid; color: #000; background: #eee; }
#title h1 { font-size: 190%; }
#vendor_notice { padding: 2em; margin: 1em; background: #000000; color: #ff0000; font-size: 150%; display: none; }
#nobad { padding: 2em; margin: 1em; background: #ff3333; display: none; }
#nobad div { font-size: 150%; margin: 0.5em; }
#noevade { padding: 1em; margin: 1em; background: green; display: none; }
#overblock { padding: 1em; margin: 1em; background: #ff9933; display: none; }
#evadable { padding: 1em; margin: 1em; background: #ff3333; display: none; }
lib/App/DubiousHTTP/Tests.pm view on Meta::CPAN
try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
catch(e) {
try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
catch(e) { req = null; }
}
}
if (!req) {
return null;
}
try {
try { req.overrideMimeType('text/plain; charset=x-user-defined'); }
catch(e) { _log("no support for overrideMimeType"); }
if (callback) {
var done = 0;
req.ontimeout = function() {
if (!done) {
done = 1;
callback(req,'timeout');
}
};
req.onreadystatechange = function() {
( run in 0.252 second using v1.01-cache-2.11-cpan-4d50c553e7e )