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 {
115115 return fmt .Errorf ("too many arguments passed in the command line invocation of kubectl curl [URL] [container]" )
116116 }
117117
118+ if strings .Index (query , "://" ) < 0 {
119+ query = "http://" + query
120+ }
121+
118122 requestURL , err := url .Parse (query )
119123 if err != nil {
120124 return fmt .Errorf ("malformed URL: %w" , err )
121125 }
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- }
129126
130127 podName , podPort , err := net .SplitHostPort (requestURL .Host )
131128 if err != nil {
Original file line number Diff line number Diff line change @@ -1024,8 +1024,8 @@ func NewOptionSet() OptionSet {
10241024 ServiceName ("" ),
10251025 ShowError (false ),
10261026 Silent (false ),
1027- // SOCKS4(""),
1028- // SOCKS4a(""),
1027+ SOCKS4 ("" ),
1028+ SOCKS4a ("" ),
10291029 SOCKS5Basic (false ),
10301030 SOCKS5GssAPIService ("" ),
10311031 SOCKS5GssAPI (false ),
You can’t perform that action at this time.
0 commit comments