Skip to content

Commit 2fc19f1

Browse files
committed
example.com -> www.example.com
1 parent c5c94db commit 2fc19f1

10 files changed

Lines changed: 25 additions & 21 deletions

File tree

multinode_integration_tests/tests/bookkeeping_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ fn provided_and_consumed_services_are_recorded_in_databases() {
2929

3030
let mut client = originating_node.make_client(8080, STANDARD_CLIENT_TIMEOUT_MILLIS);
3131
client.set_timeout(Duration::from_secs(20));
32-
let request = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n".as_bytes();
32+
let request = "GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n".as_bytes();
3333

3434
client.send_chunk(request);
3535
let response = String::from_utf8(client.wait_for_chunk()).unwrap();
3636
assert!(
3737
response.contains("<h1>Example Domain</h1>"),
38-
"Not from example.com:\n{}",
38+
"Not from www.example.com:\n{}",
3939
response
4040
);
4141

multinode_integration_tests/tests/communication_failure_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn neighborhood_notified_of_newly_missing_node() {
103103

104104
//Establish a client on the originating Node and send some ill-fated traffic.
105105
let mut client = originating_node.make_client(8080, STANDARD_CLIENT_TIMEOUT_MILLIS);
106-
client.send_chunk("GET http://example.com HTTP/1.1\r\n\r\n".as_bytes());
106+
client.send_chunk("GET http://www.example.com HTTP/1.1\r\n\r\n".as_bytes());
107107

108108
// Now direct the witness Node to wait for Gossip about the disappeared Node.
109109
let (disappearance_gossip, _) = witness_node
@@ -409,7 +409,7 @@ fn dns_resolution_failure_no_longer_blacklists_exit_node_for_all_hosts() {
409409
),
410410
);
411411

412-
client.send_chunk("GET / HTTP/1.1\r\nHost: example.com\r\n\r\n".as_bytes());
412+
client.send_chunk("GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n".as_bytes());
413413
let cheapest_node = node_list.first().unwrap();
414414
let cheapest_node_expired_cores_package = cheapest_node
415415
.wait_for_specific_package(

multinode_integration_tests/tests/data_routing_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fn tls_end_to_end_routing_test() {
175175
.expect("Could not set read timeout to 1000ms");
176176
let connector = TlsConnector::new().expect("Could not build TlsConnector");
177177
match connector.connect(
178-
"example.com",
178+
"www.example.com",
179179
stream.try_clone().expect("Couldn't clone TcpStream"),
180180
) {
181181
Ok(s) => {
@@ -199,7 +199,7 @@ fn tls_end_to_end_routing_test() {
199199

200200
tls_stream.expect("Couldn't handshake")
201201
};
202-
let request = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n".as_bytes();
202+
let request = "GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n".as_bytes();
203203
tls_stream
204204
.write(request.clone())
205205
.expect("Could not write request to TLS stream");

node/src/blockchain/blockchain_bridge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ mod tests {
662662
#[test]
663663
fn blockchain_interface_is_constructed_with_a_blockchain_service_url() {
664664
init_test_logging();
665-
let blockchain_service_url = "https://example.com";
665+
let blockchain_service_url = "https://www.example.com";
666666
let subject = BlockchainBridge::initialize_blockchain_interface(
667667
Some(blockchain_service_url.to_string()),
668668
TEST_DEFAULT_CHAIN,

node/src/proxy_server/mod.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6329,15 +6329,18 @@ mod tests {
63296329

63306330
#[test]
63316331
fn hostname_works() {
6332-
assert_on_hostname("https://example.com/folder/file.html", "example.com");
6333-
assert_on_hostname("example.com/index.php?arg=test", "example.com");
6332+
assert_on_hostname(
6333+
"https://www.example.com/folder/file.html",
6334+
"www.example.com",
6335+
);
6336+
assert_on_hostname("www.example.com/index.php?arg=test", "www.example.com");
63346337
assert_on_hostname("sub.example.com/index.php?arg=test", "sub.example.com");
63356338
assert_on_hostname("1.1.1.1", "1.1.1.1");
63366339
assert_on_hostname("", "");
63376340
assert_on_hostname("example", "example");
63386341
assert_on_hostname(
6339-
"htttttps://example.com/folder/file.html",
6340-
"htttttps://example.com/folder/file.html",
6342+
"htttttps://www.example.com/folder/file.html",
6343+
"htttttps://www.example.com/folder/file.html",
63416344
);
63426345
}
63436346

@@ -6379,11 +6382,11 @@ mod tests {
63796382
Err("localhost".to_string())
63806383
);
63816384
assert_eq!(
6382-
Hostname::new("example.com").validate_non_loopback_host(),
6385+
Hostname::new("www.example.com").validate_non_loopback_host(),
63836386
Ok(())
63846387
);
63856388
assert_eq!(
6386-
Hostname::new("https://example.com").validate_non_loopback_host(),
6389+
Hostname::new("https://www.example.com").validate_non_loopback_host(),
63876390
Ok(())
63886391
);
63896392
}

node/src/stream_reader.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,8 @@ mod tests {
538538
Box::new(TlsDiscriminatorFactory::new()),
539539
Box::new(HttpRequestDiscriminatorFactory::new()),
540540
];
541-
let http_connect_request = Vec::from("CONNECT example.com:443 HTTP/1.1\r\n\r\n".as_bytes());
541+
let http_connect_request =
542+
Vec::from("CONNECT www.example.com:443 HTTP/1.1\r\n\r\n".as_bytes());
542543
// Magic TLS Sauce stolen from Configuration
543544
let tls_request = Vec::from(&[0x16, 0x03, 0x01, 0x00, 0x03, 0x01, 0x02, 0x03][..]);
544545
let reader = ReadHalfWrapperMock {
@@ -594,7 +595,7 @@ mod tests {
594595
let discriminator_factories: Vec<Box<dyn DiscriminatorFactory>> =
595596
vec![Box::new(HttpRequestDiscriminatorFactory::new())];
596597
let request1 = Vec::from("GET http://here.com HTTP/1.1\r\n\r\n".as_bytes());
597-
let request2 = Vec::from("GET http://example.com HTTP/1.1\r\n\r\n".as_bytes());
598+
let request2 = Vec::from("GET http://www.example.com HTTP/1.1\r\n\r\n".as_bytes());
598599
let reader = ReadHalfWrapperMock {
599600
poll_read_results: vec![
600601
(request1.clone(), Ok(Async::Ready(request1.len()))),
@@ -651,7 +652,7 @@ mod tests {
651652
last_data: false,
652653
is_clandestine: false,
653654
sequence_number: Some(1),
654-
data: Vec::from("GET http://example.com HTTP/1.1\r\n\r\n".as_bytes()),
655+
data: Vec::from("GET http://www.example.com HTTP/1.1\r\n\r\n".as_bytes()),
655656
}
656657
);
657658
}

node/src/test_utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ pub mod unshared_test_utils {
694694
ClientRequestPayload_0v1 {
695695
stream_key: StreamKey::make_meaningful_stream_key("request"),
696696
sequenced_packet: SequencedPacket::new(make_garbage_data(bytes), 0, true),
697-
target_hostname: Some("example.com".to_string()),
697+
target_hostname: Some("www.example.com".to_string()),
698698
target_port: HTTP_PORT,
699699
protocol: ProxyProtocol::HTTP,
700700
originator_public_key: cryptde.public_key().clone(),

node/tests/initialization_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn initialization_sequence_integration() {
7878
("neighborhood-mode", Some("zero-hop")),
7979
("log-level", Some("trace")),
8080
("data-directory", Some(&data_directory.to_str().unwrap())),
81-
("blockchain-service-url", Some("https://example.com")),
81+
("blockchain-service-url", Some("https://www.example.com")),
8282
]))
8383
.unwrap();
8484
let financials_request = UiFinancialsRequest {

node/tests/tls_through_node_test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fn tls_through_node_integration() {
3131
.expect("Could not set read timeout to 1000ms");
3232
let connector = TlsConnector::new().expect("Could not build TlsConnector");
3333
match connector.connect(
34-
"example.com",
34+
"www.example.com",
3535
stream.try_clone().expect("Couldn't clone TcpStream"),
3636
) {
3737
Ok(s) => s,
@@ -51,7 +51,7 @@ fn tls_through_node_integration() {
5151
}
5252
};
5353

54-
let request = "GET / HTTP/1.1\r\nHost: example.com\r\n\r\n".as_bytes();
54+
let request = "GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n".as_bytes();
5555
tls_stream
5656
.write(request.clone())
5757
.expect("Could not write request to TLS stream");

node/tests/ui_gateway_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ fn daemon_does_not_allow_node_to_keep_his_client_alive_integration() {
142142
("chain", Some("polygon-mainnet")),
143143
("neighborhood-mode", Some("standard")),
144144
("log-level", Some("trace")),
145-
("blockchain-service-url", Some("https://example.com")),
145+
("blockchain-service-url", Some("https://www.example.com")),
146146
("data-directory", Some(&data_directory.to_str().unwrap())),
147147
]))
148148
.unwrap();

0 commit comments

Comments
 (0)