Skip to content

Commit

Permalink
Split hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
julik committed Mar 2, 2009
1 parent 86eec18 commit 5de1504
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/youtube_g/request/video_upload.rb
Expand Up @@ -58,7 +58,7 @@ def upload data, opts = {}

path = '/feeds/api/users/%s/uploads' % @user

Net::HTTP.start(base_url) do | session |
Net::HTTP.start(uploads_url) do | session |

# Use the chained IO as body so that Net::HTTP reads into the socket for us
post = Net::HTTP::Post.new(path, upload_headers)
Expand Down Expand Up @@ -117,8 +117,12 @@ def delete(video_id)

private

def uploads_url
["uploads", base_url].join('.')
end

def base_url
"uploads.gdata.youtube.com"
"gdata.youtube.com"
end

def boundary
Expand Down

0 comments on commit 5de1504

Please sign in to comment.