Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1604)

Unified Diff: appengine/components/components/endpoints_webapp2.py

Issue 2456663004: endpoints_webapp2: fix parsing params in GET request (Closed)
Patch Set: nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/components/components/endpoints_webapp2_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/components/components/endpoints_webapp2.py
diff --git a/appengine/components/components/endpoints_webapp2.py b/appengine/components/components/endpoints_webapp2.py
index 8b619dc1819ad4a823b291dd5d2bdf20c212f2d4..6437985e8aa0c9f93013ae84c23c6074d21e2cb7 100644
--- a/appengine/components/components/endpoints_webapp2.py
+++ b/appengine/components/components/endpoints_webapp2.py
@@ -59,13 +59,13 @@ def decode_message(remote_method_info, request):
# Read field values from query string parameters or URL path.
if res_container or request.method == 'GET':
- # In addition to standard ResourceContainer request type, we also support
- # GET request handlers that use Message instead of ResourceContainer,
- # because it is non-ambiguous (because GET requests cannot have body).
- if res_container:
- param_fields = res_container.parameters_message_class.all_fields()
- else:
+ if request.method == 'GET':
+ # In addition to standard ResourceContainer request type, we also support
+ # GET request handlers that use Message instead of ResourceContainer,
+ # because it is non-ambiguous (because GET requests cannot have body).
param_fields = result.all_fields()
+ else:
+ param_fields = res_container.parameters_message_class.all_fields()
for f in param_fields:
if f.name in request.route_kwargs:
values = [request.route_kwargs[f.name]]
« no previous file with comments | « no previous file | appengine/components/components/endpoints_webapp2_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698