Re: [PATCH] http.c: prompt for username on 403
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Dec 10, 2025, 02:05 UTC
- Message-ID
- <aTjVenutFBprwrrz@fruit.crustytoothpaste.net>
- In-Reply-To
- <79d2226c-b568-4385-a618-f0d3c06cd0a8@ashlesh.me>
On 2025-12-09 at 08:22:49, Ashlesh Gawande wrote:
Show 16 quoted lines
> I was working on separating the tests and thought about the original
> proposal a bit more.
> To stop the credentials from being erased on 403 could something like the
> following be acceptable?
>
> else if (results->http_code == 401 || results->http_code == 403) {
> if ((http_auth.username && http_auth.password) ||\
> (http_auth.authtype && http_auth.credential)) {
> + // Do not override existing credentials on 403
> + if (results->http_code == 403) {
> + return HTTP_ERROR;
> + }
> +
> if (http_auth.multistage) {
>
> So then we would prompt on 403 only if credentials are not configured.Can you tell me what file you see this in? I don't actually see any place in the code that has "http_code == 403" in the latest version of the main branch.
I wonder if your issue may already be fixed in a newer version than you have.
-- brian m. carlson (they/them) Toronto, Ontario, CA