This repository was archived by the owner on Dec 18, 2018. It is now read-only.
File tree 3 files changed +22
-5
lines changed
src/Microsoft.AspNet.Server.Kestrel 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 8
8
using System . Text ;
9
9
using System . Threading ;
10
10
using System . Threading . Tasks ;
11
+ using Microsoft . AspNet . Http ;
11
12
using Microsoft . AspNet . Server . Kestrel . Infrastructure ;
12
13
using Microsoft . Extensions . Logging ;
13
14
using Microsoft . Extensions . Primitives ;
@@ -53,13 +54,13 @@ public Frame(ConnectionContext context) : base(context)
53
54
public string Path { get ; set ; }
54
55
public string QueryString { get ; set ; }
55
56
public string HttpVersion { get ; set ; }
56
- public IDictionary < string , StringValues > RequestHeaders { get ; set ; }
57
+ public IHeaderDictionary RequestHeaders { get ; set ; }
57
58
public MessageBody MessageBody { get ; set ; }
58
59
public Stream RequestBody { get ; set ; }
59
60
60
61
public int StatusCode { get ; set ; }
61
62
public string ReasonPhrase { get ; set ; }
62
- public IDictionary < string , StringValues > ResponseHeaders { get ; set ; }
63
+ public IHeaderDictionary ResponseHeaders { get ; set ; }
63
64
public Stream ResponseBody { get ; set ; }
64
65
65
66
public Stream DuplexStream { get ; set ; }
Original file line number Diff line number Diff line change 5
5
using System . Collections ;
6
6
using System . Collections . Generic ;
7
7
using System . Linq ;
8
+ using Microsoft . AspNet . Http ;
8
9
using Microsoft . Extensions . Primitives ;
9
10
10
11
namespace Microsoft . AspNet . Server . Kestrel . Http
11
12
{
12
- public abstract class FrameHeaders : IDictionary < string , StringValues >
13
+ public abstract class FrameHeaders : IHeaderDictionary
13
14
{
14
15
protected Dictionary < string , StringValues > MaybeUnknown ;
15
16
16
17
protected Dictionary < string , StringValues > Unknown => MaybeUnknown ?? ( MaybeUnknown = new Dictionary < string , StringValues > ( StringComparer . OrdinalIgnoreCase ) ) ;
17
18
19
+ StringValues IHeaderDictionary . this [ string key ]
20
+ {
21
+ get
22
+ {
23
+ StringValues value ;
24
+ TryGetValueFast ( key , out value ) ;
25
+ return value ;
26
+ }
27
+ set
28
+ {
29
+ SetValueFast ( key , value ) ;
30
+ }
31
+ }
32
+
18
33
StringValues IDictionary < string , StringValues > . this [ string key ]
19
34
{
20
35
get
Original file line number Diff line number Diff line change 6
6
using System . IO ;
7
7
using System . Linq ;
8
8
using System . Threading . Tasks ;
9
+ using Microsoft . AspNet . Http ;
9
10
using Microsoft . AspNet . Http . Features ;
10
11
using Microsoft . AspNet . Server . Kestrel . Http ;
11
12
using Microsoft . Extensions . Primitives ;
@@ -109,7 +110,7 @@ string IHttpRequestFeature.QueryString
109
110
}
110
111
}
111
112
112
- IDictionary < string , StringValues > IHttpRequestFeature . Headers
113
+ IHeaderDictionary IHttpRequestFeature . Headers
113
114
{
114
115
get
115
116
{
@@ -161,7 +162,7 @@ string IHttpResponseFeature.ReasonPhrase
161
162
}
162
163
}
163
164
164
- IDictionary < string , StringValues > IHttpResponseFeature . Headers
165
+ IHeaderDictionary IHttpResponseFeature . Headers
165
166
{
166
167
get
167
168
{
You can’t perform that action at this time.
0 commit comments