mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:03:40 +03:00
query-part: ignore the URI part for given protocols
By setting PROTOPT_NOURLQUERY in the protocol handler struct, the protocol will get the "query part" of the URL cut off before the data is handled by the protocol-specific code. This makes libcurl adhere to RFC3986 section 2.2. Test 1220 is added to verify a file:// URL with query-part.
This commit is contained in:
parent
4403e82f32
commit
2c905fd1f8
13 changed files with 73 additions and 14 deletions
|
|
@ -171,7 +171,8 @@ const struct Curl_handler Curl_handler_scp = {
|
|||
ZERO_NULL, /* readwrite */
|
||||
PORT_SSH, /* defport */
|
||||
CURLPROTO_SCP, /* protocol */
|
||||
PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION /* flags */
|
||||
PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION
|
||||
| PROTOPT_NOURLQUERY /* flags */
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -196,7 +197,8 @@ const struct Curl_handler Curl_handler_sftp = {
|
|||
ZERO_NULL, /* readwrite */
|
||||
PORT_SSH, /* defport */
|
||||
CURLPROTO_SFTP, /* protocol */
|
||||
PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION /* flags */
|
||||
PROTOPT_DIRLOCK | PROTOPT_CLOSEACTION
|
||||
| PROTOPT_NOURLQUERY /* flags */
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue