mirror of
https://github.com/curl/curl.git
synced 2026-08-25 04:23:36 +03:00
tidy-up: miscellaneous
- GHA/windows: drop redundant double-quotes. - CMake/PickyWarnings: improve/shorten comment. - INTERNALS: fix typo in LibreSSL release date. - drop redundant parentheses from single variables and sole `#if` expressions. - cf-ip-happy: fix missing space from error string. - telnet: fix parentheses in commented PP code. - lib1922: fix typo test output text. - smbserver: unfold lines. - smbserver: use f-string. - smbserver: initialize binary string as b``. - fix typos in comments. Closes #21972
This commit is contained in:
parent
04a85a1d38
commit
2a606c68fa
16 changed files with 29 additions and 32 deletions
|
|
@ -78,7 +78,7 @@ Proxy-Connection: Keep-Alive
|
|||
|
||||
</proxy>
|
||||
<stdout>
|
||||
First request: HTTPS cache populated
|
||||
First request: HSTS cache populated
|
||||
Dup effective URL: https://hsts.example.com/%TESTNUMBER
|
||||
</stdout>
|
||||
# CURLE_COULDNT_CONNECT (7) is intentional: The proxy rejects the CONNECT
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ static CURLcode test_lib1922(const char *URL)
|
|||
(int)result, curl_easy_strerror(result));
|
||||
goto test_cleanup;
|
||||
}
|
||||
curl_mprintf("First request: HTTPS cache populated\n");
|
||||
curl_mprintf("First request: HSTS cache populated\n");
|
||||
|
||||
dup = curl_easy_duphandle(curl);
|
||||
if(!dup) {
|
||||
|
|
|
|||
|
|
@ -198,8 +198,7 @@ class TestSmbServer(imp_smbserver.SMBSERVER):
|
|||
|
||||
# Currently we only support reading files.
|
||||
if disposition != imp_smb.FILE_OPEN:
|
||||
raise SmbError(STATUS_ACCESS_DENIED,
|
||||
"Only support reading files")
|
||||
raise SmbError(STATUS_ACCESS_DENIED, "Only support reading files")
|
||||
|
||||
# Check to see if the path we were given is actually a
|
||||
# magic path which needs generating on the fly.
|
||||
|
|
@ -292,16 +291,14 @@ class TestSmbServer(imp_smbserver.SMBSERVER):
|
|||
if root_fid > 0:
|
||||
# If we have a rootFid, the path is relative to that fid
|
||||
path = conn_data["OpenedFiles"][root_fid]["FileName"]
|
||||
log.debug("RootFid present %s!" % path)
|
||||
log.debug(f'RootFid present {path}!')
|
||||
else:
|
||||
if "path" in conn_shares[tid]:
|
||||
path = conn_shares[tid]["path"]
|
||||
else:
|
||||
raise SmbError(STATUS_ACCESS_DENIED,
|
||||
"Connection share had no path")
|
||||
raise SmbError(STATUS_ACCESS_DENIED, "Connection share had no path")
|
||||
else:
|
||||
raise SmbError(imp_smbserver.STATUS_SMB_BAD_TID,
|
||||
"TID was invalid")
|
||||
raise SmbError(imp_smbserver.STATUS_SMB_BAD_TID, "TID was invalid")
|
||||
|
||||
return path
|
||||
|
||||
|
|
@ -315,7 +312,7 @@ class TestSmbServer(imp_smbserver.SMBSERVER):
|
|||
log.debug("[SMB] Created %s (%d) for storing '%s'",
|
||||
filename, fid, requested_filename)
|
||||
|
||||
contents = ""
|
||||
contents = b''
|
||||
|
||||
if requested_filename == VERIFIED_REQ:
|
||||
log.debug("[SMB] Verifying server is alive")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue