-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes to header parsing #3672
Conversation
Co-authored-by: Jon Sequeira <jonsequeira@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm modulo comments
|
||
var returnValue = secondResult.Events.OfType<ReturnValueProduced>().First(); | ||
|
||
var response = (HttpResponse)returnValue.Value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't looks like returnValue
or response
are needed.
|
||
var returnValue = secondResult.Events.OfType<ReturnValueProduced>().First(); | ||
|
||
var response = (HttpResponse)returnValue.Value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't looks like returnValue
or response
are needed.
src/Microsoft.DotNet.Interactive.Http.Tests/HttpKernelTests.NamedRequest.cs
Outdated
Show resolved
Hide resolved
{ | ||
var response = new HttpResponseMessage(HttpStatusCode.OK); | ||
response.RequestMessage = message; | ||
var contentString = @" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a raw string ("""
) will improve readability.
This PR fixes the issue with trying to get values from the headers of an http response. It looks to see if the user has a path of four, assuming they want the first element in the list and if there's a path of five then it gets the first element in the list that matches the value of the string. Additionally, a test for this scenario is included.