Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Turn ReadStreamBuffering off for WP7 and Silverlight to enable SSE su…

…pport.
  • Loading branch information...
commit 18cb087037ca25def2e9c7afed1b510577e37beb 1 parent 5916a58
@davidfowl davidfowl authored
Showing with 10 additions and 4 deletions.
  1. +1 −1  SignalR.Client/Connection.cs
  2. +9 −3 SignalR.Client/Http/HttpHelper.cs
View
2  SignalR.Client/Connection.cs
@@ -179,7 +179,7 @@ public Task Start()
/// <returns>A task that represents when the connection has started.</returns>
public Task Start(IHttpClient httpClient)
{
-#if WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE
+#if NETFX_CORE
return Start(new LongPollingTransport(httpClient));
#else
// Pick the best transport supported by the client
View
12 SignalR.Client/Http/HttpHelper.cs
@@ -156,11 +156,17 @@ private static byte[] ProcessPostData(IDictionary<string, string> postData)
private static HttpWebRequest CreateWebRequest(string url)
{
-#if !SILVERLIGHT || WINDOWS_PHONE
- return (HttpWebRequest)WebRequest.Create(url);
+ HttpWebRequest request = null;
+#if WINDOWS_PHONE
+ request = (HttpWebRequest)WebRequest.Create(url);
+ request.AllowReadStreamBuffering = false;
+#elif SILVERLIGHT
+ request = (HttpWebRequest)System.Net.Browser.WebRequestCreator.ClientHttp.Create(new Uri(url));
+ request.AllowReadStreamBuffering = false;
#else
- return (HttpWebRequest)System.Net.Browser.WebRequestCreator.ClientHttp.Create(new Uri(url));
+ request = (HttpWebRequest)WebRequest.Create(url);
#endif
+ return request;
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.