adamchainz/apig-wsgi

Query parameters not url decoded?

Closed this issue · 3 comments

I have an application using Bottle that I've tested standalone and in AWS with an ALB. When run standalone the query parameters are url decoded, when running in AWS/ALB they don't seem to be. As an example, I get a query parameter of a UK phone number. When using Bottle's default http server I get the parameter as "+4412345678", when running in AWS I get it as "%2B4412345678". Currently my code attempts to detect and strip off the "+44" before using it to match a record in a database. Should I be manually decoding the query parameters when using apig-wsgi or is this a bug?

I think it's a bug, WSGI specifies the format that query parameters should be provided to applications regardless of host. PR welcome but I don't have time to look into this.

Sadly I don't have the time either at the moment. Thanks for acknowledging though, I'll deal with this specific issue in my application until someone gets time to sort it properly.

Fixed in #102, released in version 2.4.1: https://pypi.org/project/apig-wsgi/2.4.1/