cloudendpoints / endpoints-java

A Java framework for building RESTful APIs on Google App Engine
Apache License 2.0
32 stars 35 forks source link

Query parameters not forwarded to app when API key is used #110

Closed medvedev closed 7 years ago

medvedev commented 7 years ago

Hi, Query parameters seems to be thrown away when API key is provided as query parameter. Steps to reproduce: 1) Generate API key in API sectino of google cloud console 2) Deploy echo project to appengine 3) Execute: curl -H "Content-Type: application/json" -X POST -d '{"message":"hello"}' https://[YOUR_PROJECT_ID].appspot.com/_ah/api/echo/v1/echo_api_key?key=[YOUR_API_KEY]&n=1

Output: In GAE logs request above appears without "&n=1" string in URL tail
NPE on server side because "n" parameter value is null

medvedev commented 7 years ago

Closing this as invalid. Reminder to self: escape "&" char when use it in linux shell, even in the middle of command.