Skip to content

Commit

Permalink
#1: Multiple requests for signed textures with proxying results in th…
Browse files Browse the repository at this point in the history
…e chrly property being duplicated.
  • Loading branch information
erickskrauch committed Apr 30, 2019
1 parent 8d619d5 commit 5372a7f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions http/signed_textures.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ func (cfg *Config) SignedTextures(response http.ResponseWriter, request *http.Re
},
}
} else if request.URL.Query().Get("proxy") != "" {
responseData = <-cfg.MojangTexturesQueue.GetTexturesForUsername(username)
response := <-cfg.MojangTexturesQueue.GetTexturesForUsername(username)
if response != nil {
clone := *response
responseData = &clone
}
}

if responseData == nil {
Expand All @@ -45,5 +49,5 @@ func (cfg *Config) SignedTextures(response http.ResponseWriter, request *http.Re

responseJson, _ := json.Marshal(responseData)
response.Header().Set("Content-Type", "application/json")
response.Write(responseJson)
_, _ = response.Write(responseJson)
}

0 comments on commit 5372a7f

Please sign in to comment.