File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/Servers/IIS/IIS/test/Common.FunctionalTests/Inprocess Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,9 @@ public async Task SetIISLimitMaxRequestBodySizeE2EWorks()
49
49
50
50
var result = await deploymentResult . HttpClient . PostAsync ( "/ReadRequestBody" , new StringContent ( "test" ) ) ;
51
51
52
- // IIS returns a 404 instead of a 413...
53
- Assert . Equal ( HttpStatusCode . NotFound , result . StatusCode ) ;
52
+ // IIS either returns a 404 or a 413 based on versions of IIS.
53
+ // Check for both as we don't know which specific patch version.
54
+ Assert . True ( result . StatusCode == HttpStatusCode . NotFound || result . StatusCode == HttpStatusCode . RequestEntityTooLarge ) ;
54
55
}
55
56
56
57
[ ConditionalFact ]
@@ -68,7 +69,8 @@ await connection.Send(
68
69
"Host: localhost" ,
69
70
"" ,
70
71
"A" ) ;
71
- await connection . Receive ( "HTTP/1.1 404 Not Found" ) ;
72
+ var requestLine = await connection . ReadLineAsync ( ) ;
73
+ Assert . True ( requestLine . Contains ( "404" ) || requestLine . Contains ( "413" ) ) ;
72
74
}
73
75
}
74
76
You can’t perform that action at this time.
0 commit comments