Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Handle known headers with no value #401

Merged
merged 1 commit into from
Oct 11, 2017
Merged

Handle known headers with no value #401

merged 1 commit into from
Oct 11, 2017

Conversation

Tratcher
Copy link
Member

#381 The underlying decoders don't allow for length 0 strings. The code comment is pretty obvious, it's not clear why it didn't match the code.

@Tratcher Tratcher added this to the 2.1.0 milestone Oct 11, 2017
@Tratcher Tratcher self-assigned this Oct 11, 2017
@Tratcher Tratcher requested a review from jkotalik October 11, 2017 22:33
@Tratcher
Copy link
Member Author

The old HttpListener code was about the same, except it didn't run through a decoder, it tried to directly marshal as a string.
http://referencesource.microsoft.com/#System/net/System/Net/UnsafeNativeMethods.cs,3006

Copy link
Contributor

@jkotalik jkotalik left a comment

Choose a reason for hiding this comment

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

👍


var context = await server.AcceptAsync(Utilities.DefaultTimeout);
var requestHeaders = context.Request.Headers;
Assert.Equal(3, requestHeaders.Count);
Copy link
Contributor

Choose a reason for hiding this comment

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

So for these tests, are there always 3 default headers?

@Tratcher Tratcher merged commit 7f96eab into dev Oct 11, 2017
@Tratcher Tratcher deleted the tratcher/headers branch October 11, 2017 23:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants