Obsolete
Status Update
Comments
gr...@google.com <gr...@google.com>
is...@google.com <is...@google.com>
kn...@google.com <kn...@google.com> #2
I should note that this feature request is closed. For any feature request similar to this case, I encourage you to open a new one in the Issue Tracker [1].
[1]https://cloud.google.com/support/docs/issue-trackers
[1]
Description
appserver trivial, but am trying to avoid monkey patching and code
duplication. I've run into a problem trying to get a thread containing an
appserver to terminate itself so I can run each test suite in a sandbox.
Proposal
--------
When a HTTP request in the form /_APP_ENGINE_SHUTDOWN is received by the
dev appserver the currently running request handler will raise an exception
rather than delegating to tbhandler causing the HTTPServer to abandon what
it's doing.
Advantages
----------
This makes it easy to deal with ephemeral servers used by test runners,
such as for selenium.
Potential Problems
------------------
It allows malicious users to shut down an app server. I don't think this
is a massive problem as it is a development server, after all.
Mitigation
==========
Potentially we could:
- Only allow shutdown if a shared secret from app.yaml is provided
- Only allow shutdown from loopback
- Make this option disabled by default and toggleable with an argv option
I'm willing to submit a patch for this, if it's considered a good idea.
RFC, please.