Browse Source

Call SetEndOfSendNotification

	We have to call SetEndOfSendNotification() as soon as the context is ready.
	Fixes bug #632253.
Gonzalo Paniagua Javier 15 years ago
parent
commit
dff680e41a
1 changed files with 8 additions and 1 deletions
  1. 8 1
      mcs/class/System.Web/System.Web/HttpRuntime.cs

+ 8 - 1
mcs/class/System.Web/System.Web/HttpRuntime.cs

@@ -114,6 +114,7 @@ namespace System.Web
 		static Cache cache;
 		static Cache internalCache;
 		static WaitCallback do_RealProcessRequest;
+		static HttpWorkerRequest.EndOfSendNotification end_of_send_cb;
 		static Exception initialException;
 		static bool firstRun;
 		static bool assemblyMappingEnabled;
@@ -159,6 +160,7 @@ namespace System.Web
 					RealProcessRequest (state);
 				} catch {}
 				});
+			end_of_send_cb = new HttpWorkerRequest.EndOfSendNotification (EndOfSend);
 		}
 		
 #region AppDomain handling
@@ -493,6 +495,7 @@ namespace System.Web
 				HttpContext.Current = null;
 			} else {
 				context.ApplicationInstance = app;
+				req.SetEndOfSendNotification (end_of_send_cb, context);
 
 				//
 				// Ask application to service the request
@@ -522,7 +525,11 @@ namespace System.Web
 				HttpApplicationFactory.Recycle (app);
 			}
 		}
-		
+
+		static void EndOfSend (HttpWorkerRequest ignored1, object ignored2)
+		{
+		}
+
 		//
 		// ProcessRequest method is executed in the AppDomain of the application
 		//