Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make local mode querystring processing consistent with APIGateway #965

Merged

Conversation

stealthycoin
Copy link
Contributor

closes: #964

@codecov-io
Copy link

codecov-io commented Oct 12, 2018

Codecov Report

Merging #965 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #965   +/-   ##
=======================================
  Coverage   95.52%   95.52%           
=======================================
  Files          27       27           
  Lines        4449     4449           
  Branches      558      558           
=======================================
  Hits         4250     4250           
  Misses        128      128           
  Partials       71       71
Impacted Files Coverage Δ
chalice/local.py 99.36% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91a4ad4...7c47fe8. Read the comment docs.

Copy link
Contributor

@kyleknap kyleknap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢

@stealthycoin
Copy link
Contributor Author

Just to show it matches API Gateway:

from chalice import Chalice

app = Chalice(app_name='test-query')


@app.route('/')
def index():
    return 'args: %s' % app.current_request.query_params
$ curl "localhost:8000/?a=1&a=2"
args: {'a': '2'}
$ curl $(chalice url)"?a=1&a=2"
args: {'a': '2'}

API Gateway uses last-given which takes the last element. This change
switches local mode to be consistent with that. Previously local mode
used first-given.
@stealthycoin stealthycoin force-pushed the consistent-local-mode-query-args branch from 0197866 to 7c47fe8 Compare October 15, 2018 17:00
@stealthycoin stealthycoin merged commit 947eb8f into aws:master Oct 15, 2018
@stealthycoin stealthycoin deleted the consistent-local-mode-query-args branch October 15, 2018 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query parameter parsing in local dev server
3 participants