mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-03-27 20:30:27 +02:00
Use httpHandler pointer
This commit is contained in:
parent
f1c2bfa6a6
commit
5c8dfd1b2f
@ -24,8 +24,8 @@ type httpHandler struct {
|
|||||||
sem chan struct{}
|
sem chan struct{}
|
||||||
}
|
}
|
||||||
|
|
||||||
func newHTTPHandler() httpHandler {
|
func newHTTPHandler() *httpHandler {
|
||||||
return httpHandler{make(chan struct{}, conf.Concurrency)}
|
return &httpHandler{make(chan struct{}, conf.Concurrency)}
|
||||||
}
|
}
|
||||||
|
|
||||||
func parsePath(r *http.Request) (string, processingOptions, error) {
|
func parsePath(r *http.Request) (string, processingOptions, error) {
|
||||||
@ -153,7 +153,7 @@ func (h *httpHandler) unlock() {
|
|||||||
<-h.sem
|
<-h.sem
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h httpHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
func (h *httpHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||||
log.Printf("GET: %s\n", r.URL.RequestURI())
|
log.Printf("GET: %s\n", r.URL.RequestURI())
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user