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:
committed by
Daniel Stenberg
parent
4403e82f32
commit
2c905fd1f8
@@ -125,7 +125,8 @@ const struct Curl_handler Curl_handler_imap = {
|
||||
ZERO_NULL, /* readwrite */
|
||||
PORT_IMAP, /* defport */
|
||||
CURLPROTO_IMAP, /* protocol */
|
||||
PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD /* flags */
|
||||
PROTOPT_CLOSEACTION | PROTOPT_NEEDSPWD
|
||||
| PROTOPT_NOURLQUERY /* flags */
|
||||
};
|
||||
|
||||
|
||||
@@ -151,7 +152,8 @@ const struct Curl_handler Curl_handler_imaps = {
|
||||
ZERO_NULL, /* readwrite */
|
||||
PORT_IMAPS, /* defport */
|
||||
CURLPROTO_IMAP | CURLPROTO_IMAPS, /* protocol */
|
||||
PROTOPT_CLOSEACTION | PROTOPT_SSL | PROTOPT_NEEDSPWD /* flags */
|
||||
PROTOPT_CLOSEACTION | PROTOPT_SSL | PROTOPT_NEEDSPWD
|
||||
| PROTOPT_NOURLQUERY /* flags */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user