Skip to content

Commit

Permalink
allow :port style shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Oct 9, 2013
1 parent 81c9988 commit 711168a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion httpie/input.py
Expand Up @@ -138,7 +138,10 @@ def parse_args(self, env, args=None, namespace=None):
if not (self.args.url.startswith((HTTP, HTTPS))):
# Default to 'https://' if invoked as `https args`.
scheme = HTTPS if self.env.progname == 'https' else HTTP
self.args.url = scheme + self.args.url
if self.args.url.startswith(':'):
self.args.url = scheme + 'localhost' + self.args.url
else:
self.args.url = scheme + self.args.url
self._process_auth()

return self.args
Expand Down

0 comments on commit 711168a

Please sign in to comment.