<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -63,7 +63,7 @@ module AWS
         path         = self.class.prepare_path(path)
         request      = request_method(:get).new(path, {})
         query_string = query_string_authentication(request, current_host, options)
-        returning &quot;#{protocol(options)}#{http.address}#{port_string}#{path}&quot; do |url|
+        returning &quot;#{protocol(options)}#{get_host(current_host)}#{port_string}#{path}&quot; do |url|
           url &lt;&lt; &quot;?#{query_string}&quot; if authenticate
         end
       end
@@ -129,7 +129,11 @@ module AWS
         end
         
         def set_host!(request, host)
-          request['Host'] = (host &amp;&amp; http.address.match(host)) ? http.address : host.nil? ? http.address : host.match(/amazonaws.com/) ? host : &quot;#{host}.#{http.address}&quot;
+          request['Host'] = get_host(host)
+        end
+        
+        def get_host(host)
+          (host &amp;&amp; http.address.match(host)) ? http.address : host.nil? ? http.address : host.match(/amazonaws.com/) ? host : &quot;#{host}.#{http.address}&quot;
         end
         
         def query_string_authentication(request, current_host, options = {})</diff>
      <filename>lib/aws/s3/connection.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c1e0e9fe8988ffd9c4acb1fe0c16b56f74a8f171</id>
    </parent>
  </parents>
  <author>
    <name>Lars Pind</name>
    <email>lars@pinds.com</email>
  </author>
  <url>http://github.com/isaacfeliu/aws-s3/commit/f8f41fe948cae8168e2390d1b513abf5f7d4a3bd</url>
  <id>f8f41fe948cae8168e2390d1b513abf5f7d4a3bd</id>
  <committed-date>2008-12-09T10:06:30-08:00</committed-date>
  <authored-date>2008-12-09T10:06:30-08:00</authored-date>
  <message>Return a URL that uses the right host from url_for</message>
  <tree>a5ba69732d9bffc1fe6a0fd43f3b55ada0696da0</tree>
  <committer>
    <name>Lars Pind</name>
    <email>lars@pinds.com</email>
  </committer>
</commit>
