diff --git a/internal/agent/http_cache/http_cache.go b/internal/agent/http_cache/http_cache.go index 75325df1..4ff17830 100644 --- a/internal/agent/http_cache/http_cache.go +++ b/internal/agent/http_cache/http_cache.go @@ -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) diff --git a/internal/agent/http_cache/http_cache_test.go b/internal/agent/http_cache/http_cache_test.go index 7791ffad..94eff7d1 100644 --- a/internal/agent/http_cache/http_cache_test.go +++ b/internal/agent/http_cache/http_cache_test.go @@ -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)