       if redirectURL
         # Handle redirection, make sure we're not caught in an infinite loop
         ++redirects
-        if redirects > browser.maxRedirects
-          callback(new Error("More than #{browser.maxRedirects} redirects, giving up"))
+        if redirects > @maxRedirects
+          callback(new Error("More than #{@maxRedirects} redirects, giving up"))
           return
 
         redirectHeaders = {}

# Also handles file: URLs and creates query string from request.params for
# GET/HEAD/DELETE requests.
Resources.normalizeURL = (request, next)->
  browser = request.browser
  if /^file:/.test(request.url)
    # File URLs are special, need to handle missing slashes and not attempt
    # to parse (downcases path)

      headers:        request.headers
      body:           request.body
      multipart:      request.multipart
      proxy:          @proxy
      jar:            false
      followRedirect: false

    Request httpRequest, (error, response)=>
      if error
        callback(error)
        return
