Skip to content

Follow-up feedback/action items for WinHttpHandler #14761

Closed

Description

@davidsh

This issue is capturing feedback from the PR which copied the sources of WinHttpHandler into GitHub.

dotnet/corefx#2149

While most of the original feedback was addressed in the PR, some feedback action items are deferred and are being tracked in this issue.

Activity

  1. self-assigned this
    on Jun 25, 2015
  2. darrelmiller commented on Jun 27, 2015

    @darrelmiller

    Would there be any possibility that the credential management/redirection handling/cookie management could be refactored into distinct message handlers that could be chained together?

    I see a few benefits of this:

    • The WinHttpHandler code itself gets simpler, easier to reason about and easier to debug
    • If for some reason those components can't be moved out of WinHttpHandler it would be very useful to know why because it means there is something that we can't do further down the pipeline. Maybe that could be resolved.
    • There may be scenarios where we want to replace one of those components. For example, from what I can tell, the auth mechanism does not have support for realms, and more concerning, I can't see where it takes the www-authenticate header into consideration. Although, maybe that is in the WinHttp library and I just can't see that code.
    • There is also some variability about how some people handle redirect requests. Replacing that functionality would be useful.

    I realize that this built in code can be disabled using policies, however, it would be really nice just to be able to pull the code completely out of the request/response pipeline.

  3. davidsh commented on Jul 1, 2015

    @davidsh
    ContributorAuthor

    @darrelmiller WinHttpHandler was designed to be tightly coupled against the native Windows WinHTTP component. In addition, many of the aspects you mentioned (credentials, cookies, redirection) are woven inside WinHTTP. This design gives the maximum performance characteristics.

    Regarding your questions about the www-authenticate header, native WinHTTP supports the standard BASIC, DIGEST, NEGOTIATE schemes. In addition, developers can also manually add 'Authorization' header to an outgoing request to deal with things like OAuth or other custom authentication patterns.

  4. davidsh commented on Jul 1, 2015

    @davidsh
    ContributorAuthor
  5. SidharthNabar commented on Jul 1, 2015

    @SidharthNabar

    A small point to add to David's response -

    For changing the handling of redirect requests, developers can disable the automatic redirection policy property of WinHttpHandler and handle redirects themselves in an upstream handler.

    Similar with Cookie management - developers can choose the cookie policy of "Use specified Cookie container" and then manage the cookie container themselves, instead of using the WinHTTP cookie handling code.

  6. karelz commented on Dec 14, 2016

    @karelz
    Member

    @davidsh please spin off separate issue(s) which are worth tracking and close this one.

  7. davidsh commented on Dec 15, 2016

    @davidsh
    ContributorAuthor

    Closing this issue now since all items are either fixed or tracked separately.

  8. transferred this issue fromdotnet/corefxon Jan 31, 2020
  9. added this to the 2.0.0 milestone on Jan 31, 2020
  10. ghost locked as resolved and limited conversation to collaborators on Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions