changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > plan9front / sys/src/cmd/webfs/http.c

revision 7039: 32d099aa68a6
parent 6925: 763ed7283ba8
child 7097: 1869e5aa116f
     1.1--- a/sys/src/cmd/webfs/http.c
     1.2+++ b/sys/src/cmd/webfs/http.c
     1.3@@ -663,7 +663,7 @@ http(char *m, Url *u, Key *shdr, Buq *qb
     1.4 			for(;;){
     1.5 				if(n >= sizeof(buf)-2){
     1.6 					if(debug)
     1.7-						fprint(2, "-> %.*s", n, buf);
     1.8+						fprint(2, "-> %.*s", utfnlen(buf, n), buf);
     1.9 					if(hwrite(h, buf, n) != n)
    1.10 						goto Badflush;
    1.11 					n = 0;
    1.12@@ -685,7 +685,7 @@ http(char *m, Url *u, Key *shdr, Buq *qb
    1.13 				continue;
    1.14 			if(n > 0){
    1.15 				if(debug)
    1.16-					fprint(2, "-> %.*s", n, buf);
    1.17+					fprint(2, "-> %.*s", utfnlen(buf, n), buf);
    1.18 				if(hwrite(h, buf, n) != n)
    1.19 					goto Badflush;
    1.20 			}
    1.21@@ -693,7 +693,7 @@ http(char *m, Url *u, Key *shdr, Buq *qb
    1.22 		}
    1.23 		n += snprint(buf+n, sizeof(buf)-n, "\r\n");
    1.24 		if(debug)
    1.25-			fprint(2, "-> %.*s", n, buf);
    1.26+			fprint(2, "-> %.*s", utfnlen(buf, n), buf);
    1.27 		if(hwrite(h, buf, n) != n){
    1.28 		Badflush:
    1.29 			alarm(0);