shithub: riscv

Download patch

ref: 70586401797baa5c60fb83840c91d218e7c40be9
parent: 8515f4ecb7063a23d01a7bdc8083e8caceb4f67a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Apr 3 05:44:48 EDT 2014

webfs: do not unescape escape

--- a/sys/src/cmd/webfs/url.c
+++ b/sys/src/cmd/webfs/url.c
@@ -31,7 +31,7 @@
 	for(r=w=s; x = *r; r++){
 		if(x == '%' && isxdigit(r[1]) && isxdigit(r[2])){
 			x = (dhex(r[1])<<4)|dhex(r[2]);
-			if(x == 0 || (x > 0x1F && x < 0x7F && strchr(spec, x))){
+			if(x == 0 || x == '%' || (x > 0x1F && x < 0x7F && strchr(spec, x))){
 				*w++ = '%';
 				*w++ = toupper(r[1]);
 				*w++ = toupper(r[2]);