File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,19 @@ sub is_redirect ($) { $_[0] && $_[0] >= 300 && $_[0] < 400; }
111
111
sub is_error ($) { $_ [0] && $_ [0] >= 400 && $_ [0] < 600; }
112
112
sub is_client_error ($) { $_ [0] && $_ [0] >= 400 && $_ [0] < 500; }
113
113
sub is_server_error ($) { $_ [0] && $_ [0] >= 500 && $_ [0] < 600; }
114
+ sub is_cacheable_by_default ($) { $_ [0] &&
115
+ ( $_ [0] == 200 # OK
116
+ || $_ [0] == 203 # Non-Authoritative Information
117
+ || $_ [0] == 204 # No Content
118
+ || $_ [0] == 206 # Not Acceptable
119
+ || $_ [0] == 300 # Multiple Choices
120
+ || $_ [0] == 301 # Moved Permanently
121
+ || $_ [0] == 404 # Not Found
122
+ || $_ [0] == 405 # Method Not Allowed
123
+ || $_ [0] == 410 # Gone
124
+ || $_ [0] == 414 # Request-URI Too Large
125
+ || $_ [0] == 501 # Not Implemented
126
+ ); }
114
127
1;
115
128
116
129
You can’t perform that action at this time.
0 commit comments