Skip to content

CrypterHttpClient.DeleteUnitResponseAsync sends POST instead of DELETE #833

Description

@Jack-Edwards

CrypterHttpClient.DeleteUnitResponseAsync builds its request with HttpMethod.Post instead of HttpMethod.Delete:

https://github.com/Crypter-File-Transfer/Crypter/blob/stable/Crypter.Common.Client/HttpClients/CrypterHttpClient.cs#L119-L126

The authenticated counterpart, CrypterAuthenticatedHttpClient.DeleteUnitResponseAsync, correctly uses HttpMethod.Delete.

The bug is currently latent. Every caller of DeleteUnitResponseAsync goes through the authenticated client, so nothing exercises the broken path today. Any future unauthenticated delete would silently issue a POST and hit either the wrong endpoint or a 404/405.

Found while reviewing #831; unrelated to that change, so it was left out of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions