Skip to content
This repository
Browse code

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

…pport.
  • Loading branch information...
commit 18cb087037ca25def2e9c7afed1b510577e37beb 1 parent 5916a58
David Fowler authored July 29, 2012
2  SignalR.Client/Connection.cs
@@ -179,7 +179,7 @@ public Task Start()
179 179
         /// <returns>A task that represents when the connection has started.</returns>
180 180
         public Task Start(IHttpClient httpClient)
181 181
         {
182  
-#if WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE
  182
+#if NETFX_CORE
183 183
             return Start(new LongPollingTransport(httpClient));
184 184
 #else
185 185
             // Pick the best transport supported by the client
12  SignalR.Client/Http/HttpHelper.cs
@@ -156,11 +156,17 @@ private static byte[] ProcessPostData(IDictionary<string, string> postData)
156 156
 
157 157
         private static HttpWebRequest CreateWebRequest(string url)
158 158
         {
159  
-#if !SILVERLIGHT || WINDOWS_PHONE
160  
-            return (HttpWebRequest)WebRequest.Create(url);
  159
+            HttpWebRequest request = null;
  160
+#if WINDOWS_PHONE
  161
+            request = (HttpWebRequest)WebRequest.Create(url);
  162
+            request.AllowReadStreamBuffering = false;
  163
+#elif SILVERLIGHT
  164
+            request = (HttpWebRequest)System.Net.Browser.WebRequestCreator.ClientHttp.Create(new Uri(url));
  165
+            request.AllowReadStreamBuffering = false;
161 166
 #else
162  
-            return (HttpWebRequest)System.Net.Browser.WebRequestCreator.ClientHttp.Create(new Uri(url));
  167
+            request = (HttpWebRequest)WebRequest.Create(url);
163 168
 #endif
  169
+            return request;
164 170
         }
165 171
     }
166 172
 }

0 notes on commit 18cb087

Please sign in to comment.
Something went wrong with that request. Please try again.