sproutcore/abbot — pull request #74 by dkduck (2011-10-10 15:06:49+00:00)
Title: Fixes a bug with automatically following redirects to external hosts

em-http-request automatically follows redirects, however it always keeps the host header from the original request. Therefore redirects to external hosts do not work.

This is related to what is described here: https://github.com/igrigorik/em-http-request/issues/110

I've added the small em-http-request middleware to clear the Host field from the request header in case of redirects so that the Host field gets set with the new host from the redirect response Location header.