File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed
src/ServiceControl/Infrastructure/Nancy Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change 11namespace ServiceBus . Management . Infrastructure . Nancy
22{
3- using System . Collections . Generic ;
43 using System . IO . Compression ;
54 using System . Linq ;
65 using global ::Nancy ;
@@ -19,11 +18,6 @@ public static void CheckForCompression(NancyContext context)
1918 return ;
2019 }
2120
22- if ( ! ResponseIsCompatibleMimeType ( context . Response ) )
23- {
24- return ;
25- }
26-
2721 if ( ContentLengthIsTooSmall ( context . Response ) )
2822 {
2923 return ;
@@ -63,27 +57,9 @@ static bool ContentLengthIsTooSmall(Response response)
6357 return false ;
6458 }
6559
66- static bool ResponseIsCompatibleMimeType ( Response response )
67- {
68- return ValidMimes . Any ( x => x == response . ContentType ) ;
69- }
70-
7160 static bool RequestIsGzipCompatible ( Request request )
7261 {
7362 return request . Headers . AcceptEncoding . Any ( x => x . Contains ( "gzip" ) ) ;
7463 }
75-
76- static readonly List < string > ValidMimes = new List < string >
77- {
78- "text/css" ,
79- "text/html" ,
80- "text/plain" ,
81- "application/xml" ,
82- "text/xml" ,
83- "application/json" ,
84- "text/json" ,
85- "application/xaml+xml" ,
86- "application/x-javascript"
87- } ;
8864 }
8965}
You can’t perform that action at this time.
0 commit comments