Browse files

Make sure we treat response headers from the server as case insensitive

On the mac, the browser modify the header names
  • Loading branch information...
1 parent 3e057fd commit ee4e545adc60c84a956377641722f89d721a513e @ayende ayende committed Nov 10, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 Raven.Client.Silverlight/Connection/HttpJsonRequest.cs
View
10 Raven.Client.Silverlight/Connection/HttpJsonRequest.cs
@@ -182,8 +182,14 @@ private T ReadResponse<T>(Func<WebResponse> getResponse, Func<Stream, T> handleR
}
}
- ResponseHeaders = response.Headers.AllKeys
- .ToDictionary(key => key, key => (IList<string>)new List<string> { response.Headers[key] });
+ ResponseHeaders = new Dictionary<string, IList<string>>(StringComparer.InvariantCultureIgnoreCase);
+ foreach (var key in response.Headers.AllKeys)
+ {
+ ResponseHeaders[key] = new List<string>
+ {
+ response.Headers[key]
+ };
+ }
ResponseStatusCode = ((HttpWebResponse)response).StatusCode;
using (var responseStream = response.GetResponseStream())

0 comments on commit ee4e545

Please sign in to comment.