Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The code sets the Accept-Encoding header from the client to either gzip or deflate
- if (req.http.Accept-Encoding) {
- if (req.http.Accept-Encoding ~ "gzip") {
- # If the browser supports it, we'll use gzip.
- #set req.http.Accept-Encoding = "gzip";
- unset req.http.Accept-Encoding;
- }
- else if (req.http.Accept-Encoding ~ "deflate") {
- # Next, try deflate if it is supported.
- set req.http.Accept-Encoding = "deflate";
- }
- else {
- # Unknown algorithm. Remove it and send unencoded.
- unset req.http.Accept-Encoding;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement