Skip to content

Commit

Permalink
Merge pull request #85 from marcomontalbano/queryStringParameters
Browse files Browse the repository at this point in the history
Fix 'queryStringParameters' when the url contains multiple question marks
  • Loading branch information
swyxio authored Dec 15, 2018
2 parents c7ebf0d + 8ae82cb commit 1d541c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function createHandler(dir, static) {
var lambdaRequest = {
path: request.path,
httpMethod: request.method,
queryStringParameters: queryString.parse(request.url.split("?")[1]),
queryStringParameters: queryString.parse(request.url.split(/\?(.+)/)[1]),
headers: request.headers,
body: isBase64 ? Buffer.from(request.body.toString(), "utf8").toString("base64") : request.body,
isBase64Encoded: isBase64
Expand Down

0 comments on commit 1d541c9

Please sign in to comment.