module.exports = function nodeFetchCookieDecorator (nodeFetch, jar) {
  var fetchCookie = require('./')(nodeFetch, jar)

  return function nodeFetchCookie (url, opts) {
    opts = Object.assign({}, opts, { redirect: 'manual' })

    // Forward identical options to wrapped node-fetch but tell to not handle redirection.
    return fetchCookie(url, opts)
      .then(res => {
        var isRedirect = (res.status === 303 || ((res.status === 301 || res.status === 302) && opts.method === 'POST'))

        // Interpret the proprietary "redirect" option in the same way that node-fetch does.
        if (isRedirect && opts.redirect !== 'manual' && opts.follow !== 0) {
          var optsForGet = Object.assign({}, {
            method: 'GET',
            body: null,
            // Since the "follow" flag is not relevant for node-fetch in this case,
            // we'll hijack it for our internal bookkeeping.
            follow: opts.follow !== undefined ? opts.follow - 1 : undefined
          })

          return nodeFetchCookie(res.headers.get('location'), optsForGet)
        } else {
          return res
        }
      })
  }
}

@@ -154,19 +154,26 @@
 e (url, 
-opt
+userOption
 s) %7B%0A   
@@ -173,16 +173,22 @@
 ) %7B%0A    
+const 
 opts = O
@@ -204,19 +204,26 @@
 ign(%7B%7D, 
-opt
+userOption
 s, %7B red
@@ -483,34 +483,8 @@
 302)
- && opts.method === 'POST'
 ))%0A%0A
@@ -602,19 +602,26 @@
 rect && 
-opt
+userOption
 s.redire
@@ -639,19 +639,26 @@
 ual' && 
-opt
+userOption
 s.follow
@@ -930,19 +930,26 @@
 follow: 
-opt
+userOption
 s.follow
@@ -965,19 +965,26 @@
 fined ? 
-opt
+userOption
 s.follow

Fix node-fetch redirect implementation