From 2c905fd1f8200349667dc990a17daf37214700bf Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Thu, 24 Nov 2011 23:28:54 +0100 Subject: 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. --- lib/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/file.c') diff --git a/lib/file.c b/lib/file.c index 9421c445b..4447c73f6 100644 --- a/lib/file.c +++ b/lib/file.c @@ -119,7 +119,7 @@ const struct Curl_handler Curl_handler_file = { ZERO_NULL, /* readwrite */ 0, /* defport */ CURLPROTO_FILE, /* protocol */ - PROTOPT_NONETWORK /* flags */ + PROTOPT_NONETWORK | PROTOPT_NOURLQUERY /* flags */ }; -- cgit v1.2.3