<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -110,6 +110,7 @@ module Retrieve
       @connections = options[:connections] || {}
       @cookie_store = options[:cookie_store]
       @redirects ||= []
+      @normalized_uri = self.resource.uri.normalize
       @response = send_request(options[:method], options)
       @remaining_body.reopen
       @remaining_body &lt;&lt; @response.body
@@ -158,7 +159,7 @@ module Retrieve
         @method = method
 
         @host, @port =
-          self.resource.uri.host, self.resource.uri.inferred_port
+          @normalized_uri.host, @normalized_uri.inferred_port
         if @connections[[@host, @port]]
           if options[:log]
             options[:log].write(
@@ -237,7 +238,7 @@ module Retrieve
       }.merge(options[:headers] || {})
 
       # We always need these headers.
-      headers[&quot;Host&quot;] = self.resource.uri.normalized_authority
+      headers[&quot;Host&quot;] = @normalized_uri.authority
       if options[:body]
         headers[&quot;Content-Length&quot;] = options[:body].bytesize
       end
@@ -281,7 +282,7 @@ module Retrieve
 
       # Write to the socket.
       output.write(&quot;%s %s HTTP/1.1\r\n&quot; % [
-        method.to_s.upcase, self.resource.uri.normalize.omit(
+        method.to_s.upcase, @normalized_uri.omit(
           :scheme, :authority, :fragment
         )
       ])</diff>
      <filename>lib/retrieve/clients/http.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cd435691fe733d8873c36d55dab1555c0a1acd25</id>
    </parent>
  </parents>
  <author>
    <name>Bob Aman</name>
    <email>bob@sporkmonger.com</email>
  </author>
  <url>http://github.com/sporkmonger/retrieve/commit/e8ee01e626c3d41484f22c96f7f56925a3d7671e</url>
  <id>e8ee01e626c3d41484f22c96f7f56925a3d7671e</id>
  <committed-date>2009-02-05T14:14:56-08:00</committed-date>
  <authored-date>2009-02-05T14:14:56-08:00</authored-date>
  <message>Changed how URI normalization occurs.</message>
  <tree>16d75b1e8cc8c17996c882b51bf0542f4b75fdd3</tree>
  <committer>
    <name>Bob Aman</name>
    <email>bob@sporkmonger.com</email>
  </committer>
</commit>
