Browse files

Forcing https

  • Loading branch information...
1 parent 3784ef2 commit 3e77a766f57c7865437fe7f7ec2f4b4cdfb6dc2b @drnic drnic committed Jan 30, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 lib/commands/commands.rb
View
3 lib/commands/commands.rb
@@ -286,11 +286,10 @@
res = helper.http_get "https://github.com/#{user}/#{repo}/downloads?login=#{github_user}&token=#{github_token}"
is_public = res.body =~ /You are being <a href="http:\/\/github.com/
- schema = is_public ? "http" : "https"
res = helper.http_get "#{schema}://github.com/#{user}/#{repo}/downloads?login=#{github_user}&token=#{github_token}" if is_public
die "File has already been uploaded" if res.body =~ /<td><a href=".+?\/downloads\/#{user}\/#{repo}\/#{filename}.*">#{filename}<\/a><\/td>/
- res = helper.http_post("#{schema}://github.com/#{user}/#{repo}/downloads", {
+ res = helper.http_post("https://github.com/#{user}/#{repo}/downloads", {
:file_size => File.size(filename),
:content_type => mime_type.simplified,
:file_name => filename,

0 comments on commit 3e77a76

Please sign in to comment.