@@ -72,6 +72,11 @@ typedef enum {
7272#if CURL_AT_LEAST_VERSION (7 ,30 ,0 )
7373#define SUPPORTS_IMAP_OPTIONS
7474#endif
75+ #if CURL_AT_LEAST_VERSION (8 ,9 ,0 )
76+ #define SUPPORTS_NO_GUESS_SCHEME
77+ #else
78+ #define CURLU_NO_GUESS_SCHEME 0
79+ #endif
7580
7681#define OUTPUT_URL 0 /* default */
7782#define OUTPUT_SCHEME 1
@@ -276,30 +281,33 @@ static void show_version(void)
276281 fprintf (stdout , "%s version %s libcurl/%s [built-with %s]\n" ,
277282 PROGNAME , TRURL_VERSION_TXT , data -> version , LIBCURL_VERSION );
278283 fprintf (stdout , "features:" );
279- #ifdef SUPPORTS_PUNYCODE
280- if (supports_puny )
281- fprintf (stdout , " punycode" );
282- #endif
283- #ifdef SUPPORTS_ALLOW_SPACE
284- fprintf (stdout , " white-space" );
285- #endif
286- #ifdef SUPPORTS_ZONEID
287- fprintf (stdout , " zone-id" );
284+ #ifdef SUPPORTS_IMAP_OPTIONS
285+ if (supports_imap )
286+ fprintf (stdout , " imap-options" );
288287#endif
289- #ifdef SUPPORTS_URL_STRERROR
290- fprintf (stdout , " url-strerror " );
288+ #ifdef SUPPORTS_NO_GUESS_SCHEME
289+ fprintf (stdout , "no-guess-scheme " );
291290#endif
292291#ifdef SUPPORTS_NORM_IPV4
293292 fprintf (stdout , " normalize-ipv4" );
294293#endif
295- #ifdef SUPPORTS_IMAP_OPTIONS
296- if (supports_imap )
297- fprintf (stdout , " imap-options " );
294+ #ifdef SUPPORTS_PUNYCODE
295+ if (supports_puny )
296+ fprintf (stdout , " punycode " );
298297#endif
299298#ifdef SUPPORTS_PUNY2IDN
300299 if (supports_puny )
301300 fprintf (stdout , " punycode2idn" );
302301#endif
302+ #ifdef SUPPORTS_URL_STRERROR
303+ fprintf (stdout , " url-strerror" );
304+ #endif
305+ #ifdef SUPPORTS_ALLOW_SPACE
306+ fprintf (stdout , " white-space" );
307+ #endif
308+ #ifdef SUPPORTS_ZONEID
309+ fprintf (stdout , " zone-id" );
310+ #endif
303311
304312 fprintf (stdout , "\n" );
305313 exit (0 );
@@ -982,7 +990,7 @@ static const struct var *setone(CURLU *uh, const char *setline,
982990
983991 if (conditional ) {
984992 char * piece ;
985- rc = curl_url_get (uh , v -> part , & piece , 0 );
993+ rc = curl_url_get (uh , v -> part , & piece , CURLU_NO_GUESS_SCHEME );
986994 if (!rc ) {
987995 skip = true;
988996 curl_free (piece );
0 commit comments