@@ -18,7 +18,7 @@ public async Task ServerShouldReturnETag()
18
18
{
19
19
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
20
20
21
- HttpResponseMessage response = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/Extra .xml" ) ;
21
+ HttpResponseMessage response = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/extra .xml" ) ;
22
22
Assert . NotNull ( response . Headers . ETag ) ;
23
23
Assert . NotNull ( response . Headers . ETag . Tag ) ;
24
24
}
@@ -28,8 +28,8 @@ public async Task SameETagShouldBeReturnedAgain()
28
28
{
29
29
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
30
30
31
- HttpResponseMessage response1 = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/Extra .xml" ) ;
32
- HttpResponseMessage response2 = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/Extra .xml" ) ;
31
+ HttpResponseMessage response1 = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/extra .xml" ) ;
32
+ HttpResponseMessage response2 = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/extra .xml" ) ;
33
33
Assert . Equal ( response2 . Headers . ETag , response1 . Headers . ETag ) ;
34
34
}
35
35
@@ -45,7 +45,7 @@ public async Task SameETagShouldBeReturnedAgain()
45
45
public async Task IfMatchShouldReturn412WhenNotListed ( )
46
46
{
47
47
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
48
- var req = new HttpRequestMessage ( HttpMethod . Get , "http://localhost/SubFolder/Extra .xml" ) ;
48
+ var req = new HttpRequestMessage ( HttpMethod . Get , "http://localhost/SubFolder/extra .xml" ) ;
49
49
req . Headers . Add ( "If-Match" , "\" fake\" " ) ;
50
50
HttpResponseMessage resp = await server . CreateClient ( ) . SendAsync ( req ) ;
51
51
Assert . Equal ( HttpStatusCode . PreconditionFailed , resp . StatusCode ) ;
@@ -55,9 +55,9 @@ public async Task IfMatchShouldReturn412WhenNotListed()
55
55
public async Task IfMatchShouldBeServedWhenListed ( )
56
56
{
57
57
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
58
- HttpResponseMessage original = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/Extra .xml" ) ;
58
+ HttpResponseMessage original = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/extra .xml" ) ;
59
59
60
- var req = new HttpRequestMessage ( HttpMethod . Get , "http://localhost/SubFolder/Extra .xml" ) ;
60
+ var req = new HttpRequestMessage ( HttpMethod . Get , "http://localhost/SubFolder/extra .xml" ) ;
61
61
req . Headers . Add ( "If-Match" , original . Headers . ETag . ToString ( ) ) ;
62
62
HttpResponseMessage resp = await server . CreateClient ( ) . SendAsync ( req ) ;
63
63
Assert . Equal ( HttpStatusCode . OK , resp . StatusCode ) ;
@@ -67,7 +67,7 @@ public async Task IfMatchShouldBeServedWhenListed()
67
67
public async Task IfMatchShouldBeServedForAstrisk ( )
68
68
{
69
69
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
70
- var req = new HttpRequestMessage ( HttpMethod . Get , "http://localhost/SubFolder/Extra .xml" ) ;
70
+ var req = new HttpRequestMessage ( HttpMethod . Get , "http://localhost/SubFolder/extra .xml" ) ;
71
71
req . Headers . Add ( "If-Match" , "*" ) ;
72
72
HttpResponseMessage resp = await server . CreateClient ( ) . SendAsync ( req ) ;
73
73
Assert . Equal ( HttpStatusCode . OK , resp . StatusCode ) ;
@@ -91,14 +91,14 @@ public async Task IfMatchShouldBeServedForAstrisk()
91
91
public async Task IfNoneMatchShouldReturn304ForMatchingOnGetAndHeadMethod ( )
92
92
{
93
93
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
94
- HttpResponseMessage resp1 = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/Extra .xml" ) ;
94
+ HttpResponseMessage resp1 = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/extra .xml" ) ;
95
95
96
- var req2 = new HttpRequestMessage ( HttpMethod . Get , "http://localhost/SubFolder/Extra .xml" ) ;
96
+ var req2 = new HttpRequestMessage ( HttpMethod . Get , "http://localhost/SubFolder/extra .xml" ) ;
97
97
req2 . Headers . Add ( "If-None-Match" , resp1 . Headers . ETag . ToString ( ) ) ;
98
98
HttpResponseMessage resp2 = await server . CreateClient ( ) . SendAsync ( req2 ) ;
99
99
Assert . Equal ( HttpStatusCode . NotModified , resp2 . StatusCode ) ;
100
100
101
- var req3 = new HttpRequestMessage ( HttpMethod . Head , "http://localhost/SubFolder/Extra .xml" ) ;
101
+ var req3 = new HttpRequestMessage ( HttpMethod . Head , "http://localhost/SubFolder/extra .xml" ) ;
102
102
req3 . Headers . Add ( "If-None-Match" , resp1 . Headers . ETag . ToString ( ) ) ;
103
103
HttpResponseMessage resp3 = await server . CreateClient ( ) . SendAsync ( req3 ) ;
104
104
Assert . Equal ( HttpStatusCode . NotModified , resp3 . StatusCode ) ;
@@ -108,14 +108,14 @@ public async Task IfNoneMatchShouldReturn304ForMatchingOnGetAndHeadMethod()
108
108
public async Task IfNoneMatchShouldBeIgnoredForNonTwoHundredAnd304Responses ( )
109
109
{
110
110
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
111
- HttpResponseMessage resp1 = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/Extra .xml" ) ;
111
+ HttpResponseMessage resp1 = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/extra .xml" ) ;
112
112
113
- var req2 = new HttpRequestMessage ( HttpMethod . Post , "http://localhost/SubFolder/Extra .xml" ) ;
113
+ var req2 = new HttpRequestMessage ( HttpMethod . Post , "http://localhost/SubFolder/extra .xml" ) ;
114
114
req2 . Headers . Add ( "If-None-Match" , resp1 . Headers . ETag . ToString ( ) ) ;
115
115
HttpResponseMessage resp2 = await server . CreateClient ( ) . SendAsync ( req2 ) ;
116
116
Assert . Equal ( HttpStatusCode . NotFound , resp2 . StatusCode ) ;
117
117
118
- var req3 = new HttpRequestMessage ( HttpMethod . Put , "http://localhost/SubFolder/Extra .xml" ) ;
118
+ var req3 = new HttpRequestMessage ( HttpMethod . Put , "http://localhost/SubFolder/extra .xml" ) ;
119
119
req3 . Headers . Add ( "If-None-Match" , resp1 . Headers . ETag . ToString ( ) ) ;
120
120
HttpResponseMessage resp3 = await server . CreateClient ( ) . SendAsync ( req3 ) ;
121
121
Assert . Equal ( HttpStatusCode . NotFound , resp3 . StatusCode ) ;
@@ -136,7 +136,7 @@ public async Task ServerShouldReturnLastModified()
136
136
{
137
137
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
138
138
139
- HttpResponseMessage response = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/Extra .xml" ) ;
139
+ HttpResponseMessage response = await server . CreateClient ( ) . GetAsync ( "http://localhost/SubFolder/extra .xml" ) ;
140
140
Assert . NotNull ( response . Content . Headers . LastModified ) ;
141
141
}
142
142
@@ -154,11 +154,11 @@ public async Task MatchingBothConditionsReturnsNotModified()
154
154
{
155
155
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
156
156
HttpResponseMessage resp1 = await server
157
- . CreateRequest ( "/SubFolder/Extra .xml" )
157
+ . CreateRequest ( "/SubFolder/extra .xml" )
158
158
. GetAsync ( ) ;
159
159
160
160
HttpResponseMessage resp2 = await server
161
- . CreateRequest ( "/SubFolder/Extra .xml" )
161
+ . CreateRequest ( "/SubFolder/extra .xml" )
162
162
. AddHeader ( "If-None-Match" , resp1 . Headers . ETag . ToString ( ) )
163
163
. And ( req => req . Headers . IfModifiedSince = resp1 . Content . Headers . LastModified )
164
164
. GetAsync ( ) ;
@@ -171,27 +171,27 @@ public async Task MissingEitherOrBothConditionsReturnsNormally()
171
171
{
172
172
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
173
173
HttpResponseMessage resp1 = await server
174
- . CreateRequest ( "/SubFolder/Extra .xml" )
174
+ . CreateRequest ( "/SubFolder/extra .xml" )
175
175
. GetAsync ( ) ;
176
176
177
177
DateTimeOffset lastModified = resp1 . Content . Headers . LastModified . Value ;
178
178
DateTimeOffset pastDate = lastModified . AddHours ( - 1 ) ;
179
179
DateTimeOffset furtureDate = lastModified . AddHours ( 1 ) ;
180
180
181
181
HttpResponseMessage resp2 = await server
182
- . CreateRequest ( "/SubFolder/Extra .xml" )
182
+ . CreateRequest ( "/SubFolder/extra .xml" )
183
183
. AddHeader ( "If-None-Match" , "\" fake\" " )
184
184
. And ( req => req . Headers . IfModifiedSince = lastModified )
185
185
. GetAsync ( ) ;
186
186
187
187
HttpResponseMessage resp3 = await server
188
- . CreateRequest ( "/SubFolder/Extra .xml" )
188
+ . CreateRequest ( "/SubFolder/extra .xml" )
189
189
. AddHeader ( "If-None-Match" , resp1 . Headers . ETag . ToString ( ) )
190
190
. And ( req => req . Headers . IfModifiedSince = pastDate )
191
191
. GetAsync ( ) ;
192
192
193
193
HttpResponseMessage resp4 = await server
194
- . CreateRequest ( "/SubFolder/Extra .xml" )
194
+ . CreateRequest ( "/SubFolder/extra .xml" )
195
195
. AddHeader ( "If-None-Match" , "\" fake\" " )
196
196
. And ( req => req . Headers . IfModifiedSince = furtureDate )
197
197
. GetAsync ( ) ;
@@ -219,7 +219,7 @@ public async Task InvalidIfModifiedSinceDateFormatGivesNormalGet()
219
219
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
220
220
221
221
HttpResponseMessage res = await server
222
- . CreateRequest ( "/SubFolder/Extra .xml" )
222
+ . CreateRequest ( "/SubFolder/extra .xml" )
223
223
. AddHeader ( "If-Modified-Since" , "bad-date" )
224
224
. GetAsync ( ) ;
225
225
@@ -239,11 +239,11 @@ public async Task IfModifiedSinceDateEqualsLastModifiedShouldReturn304()
239
239
TestServer server = TestServer . Create ( app => app . UseFileServer ( ) ) ;
240
240
241
241
HttpResponseMessage res1 = await server
242
- . CreateRequest ( "/SubFolder/Extra .xml" )
242
+ . CreateRequest ( "/SubFolder/extra .xml" )
243
243
. GetAsync ( ) ;
244
244
245
245
HttpResponseMessage res2 = await server
246
- . CreateRequest ( "/SubFolder/Extra .xml" )
246
+ . CreateRequest ( "/SubFolder/extra .xml" )
247
247
. And ( req => req . Headers . IfModifiedSince = res1 . Content . Headers . LastModified )
248
248
. GetAsync ( ) ;
249
249
0 commit comments