         headers (into {} (:response_headers result))
         location (get headers "Location")
         original-request (select-keys result [:request_form_fields
-                                              :request_headers])
+                                              :request_headers :request_uri])
         new-request (assoc original-request :request_uri location)]
-    (log/warn "HTTP response " code " to " (pr-str original-request))
+    (log/info "HTTP response " code " to " (pr-str original-request))
+    (log/info "Redirecting to " location)
     (assoc (handle-download-request new-request) :redirect_from result)))
 
 (defn- execute-request

  "Returns the response entity as a Base64-encoded string, or nil if
  no response entity."
  [response]
  (when-let [entity (.. response getEntity)]
    (when (.isAvailable entity)
     (String. (Base64/encodeBase64Chunked
               (IOUtils/toByteArray (.getStream entity)))

  (let [form (Form.)]
    (doseq [[key value] fields]
      (.add form (j/as-str key) (j/as-str value)))
    (let [entity (.getWebRepresentation form)]
      ;; Some servers (e.g. the IIS server at www.ca2.uscourts.gov)
      ;; don't accept POST requests with a "charset=" attribute in the
      ;; "Content-Type" header, so set charset to null.
      (.setCharacterSet entity nil)
      entity)))

(defn- set-client-agent [request]
  (.. request getClientInfo
