[PATCH 0 of 1 RFC] login-required pragma

Thomas De Schampheleire patrickdepinguin at gmail.com
Thu Mar 19 16:34:00 EDT 2015


Hi,

Issue I'm trying to solve is this: we're implementing a script to
create a pull request directly from a repo, without using the web
interface. This script uses an API key to authenticate.

When authentication fails (invalid API key) you still get a valid
redirection response, but to a login screen rather than to the pullrequest
page. This makes it difficult for the script to differentiate a success from
a failure. One would have to search the response body for a certain string,
which is fragile.

The RFC that I'm sending adds an HTTP pragma header 'login-required' to the
response, which can be checked by the script in a reliable way.

Let me know what you think of this, and whether you see alternative
solutions.

Thanks,
Thomas


More information about the kallithea-general mailing list