File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 24
24
" --set host=example.com --set scheme=ftp|ftp://example.com/" ,
25
25
" --url https://curl.se/we/are.html --redirect here.html|https://curl.se/we/here.html" ,
26
26
" --url https://curl.se/we/../are.html --set port=8080|https://curl.se:8080/are.html" ,
27
+ " https://curl.se:22/ -s port=443|https://curl.se/" ,
28
+ " https://curl.se:22/ -s port=443 --get {url}|https://curl.se/" ,
27
29
" --url https://curl.se/we/are.html --get \" {path}\" |/we/are.html" ,
28
30
" --url https://curl.se/we/are.html --get \" {port}\" |443" ,
29
31
" --url https://curl.se/we/are.html --get \" {scheme}\" |https" ,
Original file line number Diff line number Diff line change @@ -356,7 +356,9 @@ static void get(struct option *op, CURLU *uh)
356
356
!strncasecmp (ptr , variables [i ].name , vlen )) {
357
357
char * nurl ;
358
358
CURLUcode rc ;
359
- rc = curl_url_get (uh , variables [i ].part , & nurl , CURLU_DEFAULT_PORT |
359
+ rc = curl_url_get (uh , variables [i ].part , & nurl ,
360
+ CURLU_DEFAULT_PORT |
361
+ CURLU_NO_DEFAULT_PORT |
360
362
(urldecode ?CURLU_URLDECODE :0 ));
361
363
switch (rc ) {
362
364
case CURLUE_OK :
@@ -669,7 +671,7 @@ static void singleurl(struct option *o,
669
671
else {
670
672
/* default output is full URL */
671
673
char * nurl = NULL ;
672
- if (!curl_url_get (uh , CURLUPART_URL , & nurl , 0 )) {
674
+ if (!curl_url_get (uh , CURLUPART_URL , & nurl , CURLU_NO_DEFAULT_PORT )) {
673
675
printf ("%s\n" , nurl );
674
676
curl_free (nurl );
675
677
}
You can’t perform that action at this time.
0 commit comments