52 dumpn(
"*** run_test");
58 srv.registerPathHandler(
"/http/1.1-good-host-wacky-port",
129 dumpn(
"*** run_test_2");
192 dumpn(
"*** run_test_3");
216 do_check_true(
id.has(
"http",
"localhost",
PORT));
217 do_check_true(
id.has(
"http",
"127.0.0.1",
PORT));
224 id.add(
"http",
"localhost", 80);
229 do_check_true(
id.has(
"http",
"localhost", 80));
233 do_check_true(
id.has(
"http",
"localhost",
PORT));
234 do_check_true(
id.has(
"http",
"127.0.0.1",
PORT));
237 do_check_false(
id.has(
"http",
"example.com",
FAKE_PORT_TWO));
267 threw = e ===
Cr.NS_ERROR_NOT_INITIALIZED;
269 do_check_true(threw);
278 threw = e ===
Cr.NS_ERROR_NOT_INITIALIZED;
280 do_check_true(threw);
289 threw = e ===
Cr.NS_ERROR_NOT_INITIALIZED;
291 do_check_true(threw);
302 var firstLine = iter.next();
322 response.setStatusLine(
"1.0", 200,
"TEST PASSED");
324 data =
"GET /http/1.0-request HTTP/1.0\r\n" +
331 do_check_eq(iter.next(),
"HTTP/1.0 200 TEST PASSED");
339 "Path: /http/1.0-request",
355 data =
"GET /http/1.1-request HTTP/1.1\r\n" +
363 data =
"GET /http/1.1-request HTTP/1.1\r\n" +
364 "Host: not-localhost\r\n" +
372 data =
"GET /http/1.1-request HTTP/1.1\r\n" +
373 "Host: not-localhost:4444\r\n" +
381 data =
"GET /http/1.1-request HTTP/1.1\r\n" +
382 "Host: 127.0.0.1\r\n" +
390 data =
"GET http://127.0.0.1/http/1.1-request HTTP/1.1\r\n" +
391 "Host: 127.0.0.1\r\n" +
399 data =
"GET http://localhost:31337/http/1.1-request HTTP/1.1\r\n" +
400 "Host: localhost:31337\r\n" +
408 data =
"GET https://localhost:4444/http/1.1-request HTTP/1.1\r\n" +
409 "Host: localhost:4444\r\n" +
420 response.setStatusLine(
"1.1", 200,
"TEST PASSED");
422 data =
"GET /http/1.1-good-host HTTP/1.1\r\n" +
423 "Host: localhost:4444\r\n" +
430 do_check_eq(iter.next(),
"HTTP/1.1 200 TEST PASSED");
438 "Path: /http/1.1-good-host",
457 response.setStatusLine(
"1.1", 200,
"TEST PASSED");
459 data =
"GET /http/1.1-ip-host HTTP/1.1\r\n" +
460 "Host: 127.0.0.1:4444\r\n" +
467 do_check_eq(iter.next(),
"HTTP/1.1 200 TEST PASSED");
475 "Path: /http/1.1-ip-host",
493 data =
"GET http://localhost:4444/http/1.1-good-host HTTP/1.1\r\n" +
494 "Host: localhost:4444\r\n" +
504 data =
"GET http://localhost:4444/http/1.1-good-host HTTP/1.1\r\n" +
505 "Host: localhost:1234\r\n" +
515 data =
"GET http://localhost:4444/http/1.1-good-host HTTP/1.1\r\n" +
516 "Host: not-localhost:4444\r\n" +
526 data =
"GET http://localhost:4444/http/1.1-good-host HTTP/1.1\r\n" +
527 "Host: yippity-skippity\r\n" +
534 srv.identity.setPrimary(
"http",
"127.0.0.1", 4444);
544 data =
"GET /http/1.0-request HTTP/1.0\r\n" +
545 "Host: not-localhost:4444\r\n" +
552 do_check_eq(iter.next(),
"HTTP/1.0 200 TEST PASSED");
560 "Path: /http/1.0-request",
579 response.setStatusLine(
"1.1", 200,
"TEST PASSED");
581 data =
"GET /http/1.1-good-host-wacky-port HTTP/1.1\r\n" +
582 "Host: localhost\r\n" +
589 do_check_eq(iter.next(),
"HTTP/1.1 200 TEST PASSED");
597 "Path: /http/1.1-good-host-wacky-port",
613 data =
"GET /http/1.1-good-host-wacky-port HTTP/1.1\r\n" +
614 "Host: localhost:\r\n" +
622 data =
"GET http://localhost/http/1.1-good-host-wacky-port HTTP/1.1\r\n" +
623 "Host: localhost\r\n" +
631 data =
"GET http://localhost:/http/1.1-good-host-wacky-port HTTP/1.1\r\n" +
632 "Host: localhost\r\n" +
640 data =
"GET http://localhost:80/http/1.1-good-host-wacky-port HTTP/1.1\r\n" +
641 "Host: who-cares\r\n" +
649 data =
"GET is-this-the-real-life-is-this-just-fantasy HTTP/1.1\r\n" +
650 "Host: localhost:4444\r\n" +
658 data =
"GET /http/1.1-request HTTP/1.1\r\n" +
659 "Host: la la la\r\n" +
667 data =
"GET http://localhost:4444/http/1.1-good-host HTTP/1.1\r\n" +
668 "Host: la la la\r\n" +
676 data =
"GET http://localhost:4444/http/1.1-request HTTP/1.0\r\n" +
677 "Host: localhost:4444\r\n" +
685 data =
"GET http://not-localhost:4444/http/1.1-request HTTP/1.1\r\n" +
686 "Host: not-localhost:4444\r\n" +
694 data =
"GET http://not-localhost:4444/http/1.1-request HTTP/1.1\r\n" +
695 "Host: localhost:4444\r\n" +
do_check_eq(typeof PlacesUtils,"object")
const HTTP_400_LEADER_LENGTH
function checkInaccurate(data)
function checkPrimariesThrow(id)
function skipHeaders(iter)
function http11goodHost(request, response)
function check11ipHost(data)
function http11ipHost(request, response)
function expectLines(iter, expectedLines)
function runRawTests(testArray, done)
function check11goodHostWackyPort(data)
function http10Request(request, response)
function writeDetails(request, response)
function RawTest(host, port, data, responseCheck)
function http11goodHostWackyPort(request, response)
function testComplete(srv)
function check11goodHost(data)
function LineIterator(data)