Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

support https - the default port for https is 443 #18

Merged
merged 1 commit into from

2 participants

@jashmenn

Hey assaf,

This pull request fixes a bug that allows SSL sites to be called. The default port for https is 443 and this change causes replay to auto-detect that when no port is specified.

@assaf assaf merged commit 539a47e into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 19, 2013
  1. @jashmenn
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/replay/proxy.coffee
View
4 lib/replay/proxy.coffee
@@ -35,7 +35,9 @@ class ProxyRequest extends HTTP.ClientRequest
constructor: (options = {}, @replay, @proxy)->
@method = (options.method || "GET").toUpperCase()
[host, port] = (options.host || options.hostname).split(":")
- @url = URL.parse("#{options.protocol || "http:"}//#{host || "localhost"}:#{options.port || port || 80}#{options.path || "/"}")
+ protocol = options.protocol || "http:"
+ port = options.port || port || (if protocol == "https:" then 443 else 80)
+ @url = URL.parse("#{protocol}//#{host || "localhost"}:#{port}#{options.path || "/"}")
@headers = {}
if options.headers
for n,v of options.headers
Something went wrong with that request. Please try again.