[lxc-devel] [lxd/master] lxd/api: Don't strip double slashes

stgraber on Github lxc-bot at linuxcontainers.org
Tue May 19 23:42:37 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 370 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200519/ab3ed120/attachment.bin>
-------------- next part --------------
From e2dcbb6786f80643c8267d3897abaf2c4e9b77dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 19 May 2020 19:41:44 -0400
Subject: [PATCH] lxd/api: Don't strip double slashes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #7344

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/api.go | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lxd/api.go b/lxd/api.go
index 70438ca6a5..0b95fe729a 100644
--- a/lxd/api.go
+++ b/lxd/api.go
@@ -20,6 +20,7 @@ func restServer(d *Daemon) *http.Server {
 	/* Setup the web server */
 	mux := mux.NewRouter()
 	mux.StrictSlash(false)
+	mux.SkipClean(true)
 
 	mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
 		w.Header().Set("Content-Type", "application/json")


More information about the lxc-devel mailing list