File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/WebJobs.Script.WebHost/Controllers Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 22// Licensed under the MIT License. See License.txt in the project root for license information.
33
44using System ;
5+ using System . IO ;
56using System . Linq ;
67using System . Net ;
78using System . Net . Http ;
@@ -70,6 +71,10 @@ public override async Task<HttpResponseMessage> ExecuteAsync(HttpControllerConte
7071 // then invoke this callback.
7172 Func < HttpRequestMessage , Task < HttpResponseMessage > > invokeFunction = async ( req ) =>
7273 {
74+ // Reset the content stream before passing the request down to the function
75+ Stream stream = await req . Content . ReadAsStreamAsync ( ) ;
76+ stream . Seek ( 0 , SeekOrigin . Begin ) ;
77+
7378 return await _scriptHostManager . HandleRequestAsync ( function , req , cancellationToken ) ;
7479 } ;
7580 response = await _webHookReceiverManager . HandleRequestAsync ( function , request , invokeFunction ) ;
You can’t perform that action at this time.
0 commit comments