File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Tools/LambdaTestTool-v2/src/Amazon.Lambda.TestTool Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ public IApiGatewayRequestTranslator Create(ApiGatewayMode apiGatewayMode)
28
28
{
29
29
ApiGatewayMode . REST => _serviceProvider . GetRequiredService < ApiGatewayProxyRequestTranslator > ( ) ,
30
30
ApiGatewayMode . HTTPV1 => _serviceProvider . GetRequiredService < ApiGatewayProxyRequestTranslator > ( ) ,
31
- ApiGatewayMode . HTTPV2 => _serviceProvider . GetRequiredService < ApiGatewayHttpApiV2ProxyRequestTranslator > ( )
31
+ ApiGatewayMode . HTTPV2 => _serviceProvider . GetRequiredService < ApiGatewayHttpApiV2ProxyRequestTranslator > ( ) ,
32
+ _ => throw new NotImplementedException ( )
32
33
} ;
33
34
}
34
35
}
Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ public string ReadRequestBody(HttpRequest request)
56
56
57
57
foreach ( var header in headers )
58
58
{
59
- singleValueHeaders [ header . Key ] = header . Value . Last ( ) ;
60
- multiValueHeaders [ header . Key ] = header . Value . ToList ( ) ;
59
+ singleValueHeaders [ header . Key ] = header . Value . Last ( ) ?? "" ;
60
+ multiValueHeaders [ header . Key ] = [ .. header . Value ] ;
61
61
}
62
62
63
63
return ( singleValueHeaders , multiValueHeaders ) ;
@@ -82,7 +82,7 @@ public string ReadRequestBody(HttpRequest request)
82
82
83
83
foreach ( var param in query )
84
84
{
85
- singleValueParams [ param . Key ] = param . Value . Last ( ) ;
85
+ singleValueParams [ param . Key ] = param . Value . Last ( ) ?? "" ;
86
86
multiValueParams [ param . Key ] = [ .. param . Value ] ;
87
87
}
88
88
You can’t perform that action at this time.
0 commit comments