This is an automated email from the ASF dual-hosted git repository.
shawnallen85 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-dotnet.git
The following commit(s) were added to refs/heads/master by this push:
new 2256a80 Fix response order (#29)
2256a80 is described below
commit 2256a80aa6900502c28d4f9b777acfbfcaa390a7
Author: sechunOH <[email protected]>
AuthorDate: Wed Dec 18 01:22:11 2019 +0900
Fix response order (#29)
---
core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs | 2 --
core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs | 4 ++++
core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs | 2 --
core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs | 4 ++++
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs
b/core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs
index 55a637f..ab04deb 100644
--- a/core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs
+++ b/core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs
@@ -155,8 +155,6 @@ namespace Apache.OpenWhisk.Runtime.Common
Initialized = true;
- await httpContext.Response.WriteResponse(200, "OK");
-
AwaitableMethod =
(Method.ReturnType.GetMethod(nameof(Task.GetAwaiter)) != null);
return (new Run(Type, Method, Constructor, AwaitableMethod));
diff --git a/core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs
b/core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs
index f11760c..8e81a54 100644
--- a/core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs
+++ b/core/dotnet2.2/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs
@@ -43,6 +43,10 @@ namespace Apache.OpenWhisk.Runtime.Common
if (httpContext.Request.Path.Equals(initPath))
{
run = await init.HandleRequest(httpContext);
+
+ if (run != null)
+ await httpContext.Response.WriteResponse(200,
"OK");
+
return;
}
diff --git a/core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs
b/core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs
index 55a637f..ab04deb 100644
--- a/core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs
+++ b/core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Init.cs
@@ -155,8 +155,6 @@ namespace Apache.OpenWhisk.Runtime.Common
Initialized = true;
- await httpContext.Response.WriteResponse(200, "OK");
-
AwaitableMethod =
(Method.ReturnType.GetMethod(nameof(Task.GetAwaiter)) != null);
return (new Run(Type, Method, Constructor, AwaitableMethod));
diff --git a/core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs
b/core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs
index f11760c..8e81a54 100644
--- a/core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs
+++ b/core/dotnet3.0/proxy/Apache.OpenWhisk.Runtime.Common/Startup.cs
@@ -43,6 +43,10 @@ namespace Apache.OpenWhisk.Runtime.Common
if (httpContext.Request.Path.Equals(initPath))
{
run = await init.HandleRequest(httpContext);
+
+ if (run != null)
+ await httpContext.Response.WriteResponse(200,
"OK");
+
return;
}