GithubHelp home page GithubHelp logo

make acceptsGzip public about gziphandler HOT 4 CLOSED

nytimes avatar nytimes commented on September 25, 2024 1
make acceptsGzip public

from gziphandler.

Comments (4)

jprobinson avatar jprobinson commented on September 25, 2024

I think this has popped up a few times so I'm into adding the option to alter the default.

Instead of making that func public, perhaps we can add a func AcceptsGzip(func(*http.Request) bool) option to let folks optionally extend it?

Would that fit your use case?

from gziphandler.

meirf avatar meirf commented on September 25, 2024

That is a slick api addition and I could see it being useful to others, but I don't have an issue with the way the library is determining compression. I just want to access the logic independently.

Feel free to change the title of this issue/repurpose/close for AcceptsGzip.

from gziphandler.

adammck avatar adammck commented on September 25, 2024

This is a dupe of #34 and #48, and I think the same recommendation applies. I don't see any problem with exporting the func, but there's already a better implementation in gddo.

from gziphandler.

tmthrgd avatar tmthrgd commented on September 25, 2024

@meirf I have an implementation based on gddo available at tmthrgd/httputils if that's useful to you.

from gziphandler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.