ginatrapani/ThinkUp — pull request #1049 by cwarden (2011-10-14 21:49:43+00:00)
Title: Facebook no server name

*This branch is based on my facebook-https branch because it uses some of the same testdata. If this one is merged first, #1048 can be closed.*

When constructing the redirect url to get an access token, use the
HTTP_HOST header value if SERVER_NAME is not defined. HTTP_HOST should
actually be the default since this is what is used to construct the
authorization url in BaseFacebook::getLoginUrl, but SERVER_NAME is kept
as the default to make this change minimally intrusive; it fixes the
case when SERVER_NAME is not defined by the web server and shouldn't
break any cases that are currently working nor any of the existing
tests.

The HTTP_HOST was also changed in
TestOfFacebookPluginConfigurationController::setUp to match SERVER_NAME
since this is the normal case. Other cases should be handled by special
tests.