X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=blobdiff_plain;f=src%2Fhtparser.c;h=c0aca2e535fb231cc0349755e59feac2f900f0c8;hp=c78f064c33f7775e1e7882586a510dc76876830b;hb=9e9eca797684e57318dde54f5a89a3029181590e;hpb=a0327573bb6032e02e988a0d0aed709b4be7a422 diff --git a/src/htparser.c b/src/htparser.c index c78f064..c0aca2e 100644 --- a/src/htparser.c +++ b/src/htparser.c @@ -369,6 +369,10 @@ static void serve(struct muth *muth, va_list args) goto out; inbuf.b[headoff] = old; bufeat(inbuf, headoff); + /* We strip off the leading slash from the rest string, so + * that multiplexers can parse coherently. */ + if(req->rest[0] == '/') + replrest(req, req->rest + 1); /* * Add metainformation and then send the request to the root