Skip to content

Remove stale TODO and dead code in AuthDigestSession.HA2#11401

Merged
jonathanpeppers merged 2 commits into
mainfrom
copilot/fix-remove-stale-todo-dead-code
May 19, 2026
Merged

Remove stale TODO and dead code in AuthDigestSession.HA2#11401
jonathanpeppers merged 2 commits into
mainfrom
copilot/fix-remove-stale-todo-dead-code

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

Empty if (QOP == "auth-int") block with a bare // TODO and commented-out code has been dead since the file was adapted from Mono's System.Net.DigestClient. It does nothing at runtime.

  • Removed the empty if block, bare // TODO, and commented-out ha2 += ... line
  • Added a comment noting auth-int QOP (RFC 7616) is unsupported since it requires the entity body hash
string? HA2 (HttpURLConnection webRequest)
{
    var uri = new Uri (webRequest.URL?.ToString ()!);
    string ha2 = $"{webRequest.RequestMethod}:{uri.PathAndQuery}";
    // Note: auth-int QOP (RFC 7616) is not supported; it would require
    // hashing the entity body which is not available here.
    return HashToHexString (ha2);
}

Copilot AI changed the title [WIP] Remove stale TODO and dead code in AuthDigestSession.HA2 method Remove stale TODO and dead code in AuthDigestSession.HA2 May 18, 2026
Copilot AI requested a review from jonathanpeppers May 18, 2026 22:07
@jonathanpeppers jonathanpeppers marked this pull request as ready for review May 19, 2026 13:18
Copilot AI review requested due to automatic review settings May 19, 2026 13:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes dead code from AuthDigestSession.HA2() (a no-op auth-int branch with TODO/commented-out code) and replaces it with an explanatory comment about auth-int being unsupported due to needing an entity-body hash.

Changes:

  • Deleted the empty if (QOP == "auth-int") block and stale TODO/commented-out line.
  • Added a comment documenting why auth-int isn’t supported in this implementation.

Comment thread src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs
Comment thread src/Mono.Android/Xamarin.Android.Net/AuthDigestSession.cs
@jonathanpeppers jonathanpeppers merged commit dc31d1d into main May 19, 2026
6 of 7 checks passed
@jonathanpeppers jonathanpeppers deleted the copilot/fix-remove-stale-todo-dead-code branch May 19, 2026 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix-finder] Remove stale bare // TODO and dead code in AuthDigestSession.HA2 method

3 participants