Skip to content

Commit

Permalink
Fix 'queryStringParameters' when the url contains multiple question m…
Browse files Browse the repository at this point in the history
…arks
  • Loading branch information
marcomontalbano committed Dec 14, 2018
1 parent c7ebf0d commit 8ae82cb
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 8ae82cb

Please sign in to comment.