Enhanced the handling of headers

Now each redirect produces its own array of header name/value pairs.