Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Spotted a possible bug in HttpRequestExtensions.UnvalidatedGetHeader #3105

Description

@rikbosch

Hi,

I was going over the codechanges to see what we need to do to migrate from 2.x to 3.x and I think I spotted a bug.

This method, located in Microsoft.ApplicationInsights.Web.Implementation.HttpRequestExtensions, line 18

 public static string UnvalidatedGetHeader(this HttpRequest httpRequest, string headerName)
 {
    string value = httpRequest.Unvalidated.Headers[headerName];
    return string.Empty;
 }

Always returns and empty string, I'd expect it to return the value of the header (or a comment as to why an empty string is always returned).

I could create a PR if needed, but it might be faster to do for someone who has already contributed to this project. Let me know what you need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.xFor issues relating to beta or stable releases of the Shimbug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions