On May 3, 10:40 am, Anand George <[email protected]> wrote:
> The location parameter is missing in the second response. It couldn't be an
> issue with the servers, cause the response from both servers have been
> verified using our http.get example. Just wondering if request formats the
> response differently in each case?

The reason is that when you tell it not to automatically redirect
(followRedirect: false), you'll see the Location header containing the
url where the request module would have redirected to. However, when
you tell the request module to follow at most 2 redirects for this
particular url, there is no Location header in response.headers
because there are no more redirects (perhaps there was just the one
redirect from the first example).

So what you are seeing is expected behavior.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to