Permalink
Browse files

Fixes #62, normalize endpoint URI

* Performs basic URI validation (no spaces, special characters, etc.)
* Normalizes default port numbers (removes 80, 443 from http(s) links)
  • Loading branch information...
1 parent 263df78 commit 44547f70e4de31f25d851ef0a623eeed893b9b27 @arax arax committed Mar 1, 2013
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/occi/bin/occi_opts.rb
View
5 lib/occi/bin/occi_opts.rb
@@ -82,10 +82,7 @@ def self.parse(args, test_env = false)
"--endpoint URI",
String,
"OCCI server URI, defaults to '#{options.endpoint}'") do |endpoint|
- # Do some basic validation of the endpoint URI
- URI(endpoint)
-
- options.endpoint = endpoint
+ options.endpoint = URI(endpoint).to_s
end
opts.on("-n",

0 comments on commit 44547f7

Please sign in to comment.