File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -115,17 +115,14 @@ func run(ctx context.Context) error {
115
115
return fmt .Errorf ("too many arguments passed in the command line invocation of kubectl curl [URL] [container]" )
116
116
}
117
117
118
+ if strings .Index (query , "://" ) < 0 {
119
+ query = "http://" + query
120
+ }
121
+
118
122
requestURL , err := url .Parse (query )
119
123
if err != nil {
120
124
return fmt .Errorf ("malformed URL: %w" , err )
121
125
}
122
- switch requestURL .Scheme {
123
- case "http" , "https" :
124
- case "" :
125
- return fmt .Errorf ("missing scheme in query URL: %s" , query )
126
- default :
127
- return fmt .Errorf ("unsupposed scheme in query URL: %s" , query )
128
- }
129
126
130
127
podName , podPort , err := net .SplitHostPort (requestURL .Host )
131
128
if err != nil {
Original file line number Diff line number Diff line change @@ -1024,8 +1024,8 @@ func NewOptionSet() OptionSet {
1024
1024
ServiceName ("" ),
1025
1025
ShowError (false ),
1026
1026
Silent (false ),
1027
- // SOCKS4(""),
1028
- // SOCKS4a(""),
1027
+ SOCKS4 ("" ),
1028
+ SOCKS4a ("" ),
1029
1029
SOCKS5Basic (false ),
1030
1030
SOCKS5GssAPIService ("" ),
1031
1031
SOCKS5GssAPI (false ),
You can’t perform that action at this time.
0 commit comments