Skip to content

Commit

Permalink
Fixed http cache regression (#801)
Browse files Browse the repository at this point in the history
* Fixed cache path regression

* Use wildcard
  • Loading branch information
fkorotkov authored Oct 15, 2024
1 parent 7413137 commit 3bd45e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/agent/http_cache/http_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func Start(opts ...Option) string {
mux := http.NewServeMux()

// HTTP cache protocol
mux.HandleFunc("/{objectname}", handler)
mux.HandleFunc("/{objectname...}", handler)

address := "127.0.0.1:12321"
listener, err := net.Listen("tcp", address)
Expand Down
2 changes: 1 addition & 1 deletion internal/agent/http_cache/http_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestHTTPCache(t *testing.T) {

client.InitClient(cirruscimock.ClientConn(t), "test", "test")

httpCacheObjectURL := "http://" + http_cache.Start() + "/" + uuid.NewString()
httpCacheObjectURL := "http://" + http_cache.Start() + "/cache/" + uuid.NewString() + "/test.txt"

// Ensure that the cache entry does not exist
resp, err := http.Get(httpCacheObjectURL)
Expand Down

0 comments on commit 3bd45e4

Please sign in to comment.