aws-lambda-dotnet icon indicating copy to clipboard operation
aws-lambda-dotnet copied to clipboard

Inconsistent behaviour with query strings (Win/Linux)

Open jnb-source opened this issue 9 years ago • 3 comments

Consider the following:

/request/path?query%string

[HttpGet("{stringVariable}")]
public async Task<JsonResult> Get(string stringVariable)

On my windows dev environment stringVariable == "query string". When deployed to an aws lambda stringVariable == "query%20string"

I presume this is a bug as the behavior differs between platforms.

Let me know if you need any more info.

Regards,

jnb-source avatar May 23 '17 09:05 jnb-source

Interesting. I'll take a look.

normj avatar May 27 '17 18:05 normj

I have been able to reproduce this and fix it for the resource path. I haven't been able to reproduce this for the query string like you mentioned. To help me debug the issue can you enable serialization debugging and send me the log.

To do that add the environment variable LAMBDA_NET_SERIALIZER_DEBUG with a value of true to the Lambda function. Once you do that execute the function again with the query string. After you do that check the CloudWatch logs to find the original JSON request. Could you add that JSON document to the issue?

The LAMBDA_NET_SERIALIZER_DEBUG environment variable does require version 0.10.1-preview1 of Amazon.Lambda.AspNetCoreServer.

normj avatar Jun 05 '17 22:06 normj

Closing for lack of activity. I did release version 0.10.2 that did address some encoding issues.

normj avatar Jun 29 '17 05:06 normj