mirror of
https://github.com/curl/curl.git
synced 2026-08-24 17:53:33 +03:00
tidy-up: miscellaneous
- H3 proxy: re-sync code with original source `curl_ngtcp2.c` to reduce
differences, and to apply missed minor fixes. Also apply clang-format.
Drop redundant `#undef`s, casts, `#endif` comments, includes, drop
intermediate variables, sync include and macro order.
Follow-up to e78b1b3ecc #21153
- INSTALL-CMAKE.md: move `CURL_ENABLE_SMB` to the enable section.
- tests/http/env: rename `tcpdmp` to `tcpdump` to match object variable.
- mbedtls: drop incorrect `mbedTLS 4+` comments.
(features are also supported by 3+, meaning it's always supported.)
- lib1648: rename a variable to match purpose.
- CIPHERS.md: alpha-sort link list.
- replace rare `X''` hex markup with `0x`.
- `IP v4/6` -> `IPv4/6`.
- 'version X.Y' -> 'vX.Y', where sensible.
- 'VX.Y' -> 'vX.Y', where sensible.
- fix indents, casing, newlines, typos.
Closes #21772
This commit is contained in:
parent
a7d4abb0cf
commit
7e1001bcd6
36 changed files with 331 additions and 372 deletions
|
|
@ -176,7 +176,7 @@ class TestWebsockets:
|
|||
r.check_exit_code(0)
|
||||
|
||||
# Send large frames and simulate send blocking on 8192 bytes chunks
|
||||
# Simlates error reported in #15865
|
||||
# Simulates error reported in #15865
|
||||
@pytest.mark.parametrize("model", [
|
||||
pytest.param(1, id='multi_perform'),
|
||||
pytest.param(2, id='curl_ws_send+recv'),
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ class EnvConfig:
|
|||
return self._h2o_version
|
||||
|
||||
@property
|
||||
def tcpdmp(self) -> Optional[str]:
|
||||
def tcpdump(self) -> Optional[str]:
|
||||
return self._tcpdump
|
||||
|
||||
def clear_locks(self):
|
||||
|
|
@ -677,7 +677,7 @@ class Env:
|
|||
|
||||
@staticmethod
|
||||
def tcpdump() -> Optional[str]:
|
||||
return Env.CONFIG.tcpdmp
|
||||
return Env.CONFIG.tcpdump
|
||||
|
||||
def __init__(self, pytestconfig=None, env_config=None):
|
||||
if env_config:
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ static const struct testcase get_parts_list[] = {
|
|||
"http://-atest/",
|
||||
"http | [11] | [12] | [13] | -atest | [15] | / | [16] | [17]",
|
||||
0, 0, CURLUE_OK },
|
||||
{ /* Multiple trailing dots is not okey */
|
||||
{ /* Multiple trailing dots is not okay */
|
||||
"http://example.com../",
|
||||
"",
|
||||
0, 0, CURLUE_BAD_HOSTNAME },
|
||||
|
|
|
|||
|
|
@ -51,11 +51,11 @@ init_failed:
|
|||
return result; /* failure */
|
||||
}
|
||||
|
||||
static CURLcode run1648(CURL *curl, const char *url, const char *userpwd)
|
||||
static CURLcode run1648(CURL *curl, const char *url, const char *proxy)
|
||||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
|
||||
result = init1648(curl, url, userpwd);
|
||||
result = init1648(curl, url, proxy);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
* "password [string]" - the password that must match (if method is 2)
|
||||
* "backend [IPv4]" - numerical IPv4 address of backend to connect to
|
||||
* "backendport [number:0]" - TCP port of backend to connect to. 0 means use
|
||||
the client's specified port number.
|
||||
* the client's specified port number.
|
||||
* "method [number: 0]" - connect method to respond with:
|
||||
* 0 - no auth
|
||||
* 1 - GSSAPI (not supported)
|
||||
|
|
@ -164,9 +164,9 @@ static void socksd_getconfig(void)
|
|||
logmsg("password [%s] set", s_config.password);
|
||||
}
|
||||
/* Methods:
|
||||
o X'00' NO AUTHENTICATION REQUIRED
|
||||
o X'01' GSSAPI
|
||||
o X'02' USERNAME/PASSWORD
|
||||
o 0x00 NO AUTHENTICATION REQUIRED
|
||||
o 0x01 GSSAPI
|
||||
o 0x02 USERNAME/PASSWORD
|
||||
*/
|
||||
else if(!strcmp(key, "method")) {
|
||||
pval = value;
|
||||
|
|
@ -441,9 +441,9 @@ static curl_socket_t sockit(curl_socket_t fd)
|
|||
return CURL_SOCKET_BAD;
|
||||
}
|
||||
/* ATYP:
|
||||
o IP V4 address: X'01'
|
||||
o DOMAINNAME: X'03'
|
||||
o IP V6 address: X'04'
|
||||
o IPv4 address: 0x01
|
||||
o domain name: 0x03
|
||||
o IPv6 address: 0x04
|
||||
*/
|
||||
type = buffer[SOCKS5_ATYP];
|
||||
address = &buffer[SOCKS5_DSTADDR];
|
||||
|
|
@ -522,17 +522,17 @@ static curl_socket_t sockit(curl_socket_t fd)
|
|||
response[SOCKS5_VERSION] = s_config.responseversion;
|
||||
|
||||
/*
|
||||
o REP Reply field:
|
||||
o X'00' succeeded
|
||||
o X'01' general SOCKS server failure
|
||||
o X'02' connection not allowed by ruleset
|
||||
o X'03' Network unreachable
|
||||
o X'04' Host unreachable
|
||||
o X'05' Connection refused
|
||||
o X'06' TTL expired
|
||||
o X'07' Command not supported
|
||||
o X'08' Address type not supported
|
||||
o X'09' to X'FF' unassigned
|
||||
o REP Reply field:
|
||||
o 0x00 succeeded
|
||||
o 0x01 general SOCKS server failure
|
||||
o 0x02 connection not allowed by ruleset
|
||||
o 0x03 Network unreachable
|
||||
o 0x04 Host unreachable
|
||||
o 0x05 Connection refused
|
||||
o 0x06 TTL expired
|
||||
o 0x07 Command not supported
|
||||
o 0x08 Address type not supported
|
||||
o 0x09 to 0xFF unassigned
|
||||
*/
|
||||
response[SOCKS5_REP] = rep;
|
||||
response[SOCKS5_RESERVED] = 0; /* must be zero */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue