summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-08-14 22:41:07 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-08-14 22:41:07 -0700
commitc004ac7c6be9936322071b2a48f95e0d967406b4 (patch)
tree26612aedd38b1f3d10bdf89c1e4c4f0d0b9c43d9 /src
parent72bd9ae7afe9421b5a45cfb8e0f20ad8dc97c0f9 (diff)
downloadDotNetOpenAuth-c004ac7c6be9936322071b2a48f95e0d967406b4.zip
DotNetOpenAuth-c004ac7c6be9936322071b2a48f95e0d967406b4.tar.gz
DotNetOpenAuth-c004ac7c6be9936322071b2a48f95e0d967406b4.tar.bz2
HTTP_X_FORWARDED_PROTO is now considered when deriving the public-facing URL.
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs b/src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs
index 3c504db..14666f2 100644
--- a/src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs
+++ b/src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs
@@ -329,6 +329,9 @@ namespace DotNetOpenAuth.Messaging {
Uri hostAndPort = new Uri(request.Url.Scheme + Uri.SchemeDelimiter + request.ServerVariables["HTTP_HOST"]);
publicRequestUri.Host = hostAndPort.Host;
publicRequestUri.Port = hostAndPort.Port;
+ if (request.ServerVariables["HTTP_X_FORWARDED_PROTO"] != null) {
+ publicRequestUri.Scheme = request.ServerVariables["HTTP_X_FORWARDED_PROTO"];
+ }
return publicRequestUri.Uri;
} else {
// Failover to the method that works for non-web farm enviroments.