This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<testcase> | |
<info> | |
<keywords> | |
HTTP | |
HTTP GET | |
Alt-Svc | |
HTTP/2 | |
</keywords> | |
</info> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 400 Bad Request | |
Server: nghttpx | |
Content-Length: 129 | |
Date: Sat, 11 Apr 2020 17:58:51 GMT | |
Content-Type: text/html; charset=UTF-8 | |
Connection: close | |
<!DOCTYPE html><html lang="en"><title>400 Bad Request</title><body><h1>400 Bad Request</h1><footer>nghttpx</footer></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<testcase> | |
<info> | |
<keywords> | |
HTTP | |
Alt-Svc | |
</keywords> | |
</info> | |
# | |
# Server-side |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 400 Bad Request | |
Server: nghttpx | |
Content-Length: 129 | |
Date: Thu, 09 Apr 2020 16:17:15 GMT | |
Content-Type: text/html; charset=UTF-8 | |
Connection: close | |
<!DOCTYPE html><html lang="en"><title>400 Bad Request</title><body><h1>400 Bad Request</h1><footer>nghttpx</footer></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<testcase> | |
<info> | |
<keywords> | |
HTTP | |
Alt-Svc | |
</keywords> | |
</info> | |
# | |
# Server-side |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<testcase> | |
<info> | |
<keywords> | |
HTTP | |
Alt-Svc | |
</keywords> | |
</info> | |
# | |
# Server-side |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<testcase> | |
<info> | |
<keywords> | |
HTTP | |
Alt-Svc | |
</keywords> | |
</info> | |
# | |
# Server-side |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
How do you sort a list of the strings "a", "bcd", "ef", and "ghij" in descending order of length? | |
(https://twitter.com/paulg/status/1244921240227282944) | |
""" | |
def sort_desc_by_string_length(data): | |
''' sorts an array by string length and return in descending order ''' | |
# use python 'sorted' builtin to sort by string length and return in reverse order | |
# (https://docs.python.org/3.8/library/functions.html?highlight=sorted#sorted) | |
return sorted(data, key=len, reverse=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat <<EOF | tee -a ~/.ssh/known_hosts | |
example.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvd4U77Q2yK0NjwBrAAVUeRTEvjH/2rnm1Mi3FgX5Y/g9/5h4wZ+FfqtdcSnbBnKN1uSnwqLS8kO3ti6MNf3/nhhXBO5XYBt1zpMggg2KAN63ThJNk62UK9QFjDdilJktOhSfMMhsZmTifX53Mpc44PdTLB53GTg57HD91E74e3UjWtjHnK1ZEjc4czVyfNdLRq9z6JoorSKqPPz9kiHiitwaKENY4kaLM4KN0CGK421G6G7uYDs3t1WyCe6DiiwJJ7r10WnE3KcSQOiow2CSVv7Mk2Ou5MiJHgASg3y+Hre6Y87OOJP0c9Lc300yMNt28hQptRyY9SD5FNsATUuMsw== | |
invalid-key.example.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvd4UERROR77Q2yK0NjwBrAAVUeRTEvjH/2rnm1Mi3FgX5Y/g9/5h4wZ+FfqtdcSnbBnKN1uSnwqLS8kO3ti6MNf3/nhhXBO5XYBt1zpMggg2KAN63ThJNk62UK9QFjDdilJktOhSfMMhsZmTifX53Mpc44PdTLB53GTg57HD91E74e3UjWtjHnK1ZEjc4czVyfNdLRq9z6JoorSKqPPz9kiHiitwaKENY4kaLM4KN0CGK421G6G7uYDs3t1WyCe6DiiwJJ7r10WnE3KcSQOiow2CSVv7Mk2Ou5MiJHgASg3y+Hre6Y87OOJP0c9Lc300yMNt28hQptRyY9SD5FNsATUuMsw== | |
empty-key.example.org | |
too-long.example.org 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c | |
index 8e043747e..b349d7ba7 100644 | |
--- a/lib/vssh/libssh2.c | |
+++ b/lib/vssh/libssh2.c | |
@@ -694,25 +694,27 @@ static CURLcode ssh_force_knownhost_key_type(struct connectdata *conn) | |
while(!libssh2_knownhost_get(sshc->kh, &store, store)) { | |
/* For non-standard ports, the name will be enclosed in */ | |
/* square brackets, followed by a colon and the port */ | |
- if(store->name[0] == '[') { | |
- kh_name_end = strstr(store->name, "]:"); |