diff options
author | Alexander Stein <alexander.stein@systec-electronic.com> | 2010-02-01 14:05:36 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-02-26 21:04:12 +0100 |
commit | 04f568a341c27a2c3e2042e1e766534f787497c4 (patch) | |
tree | fb2bffefd9e99804cdfa973ff7cb2d8904ee4c6a /patches/boa-0.94.14rc21/0006-buffer_escape.diff.patch | |
parent | 9dfb84e9a91f6e20b5cd57e6f02cc5a55404841e (diff) | |
download | ptxdist-04f568a341c27a2c3e2042e1e766534f787497c4.tar.gz ptxdist-04f568a341c27a2c3e2042e1e766534f787497c4.tar.xz |
[boa] new package
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
[mkl: update to boa-0.94, import debian patches]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'patches/boa-0.94.14rc21/0006-buffer_escape.diff.patch')
-rw-r--r-- | patches/boa-0.94.14rc21/0006-buffer_escape.diff.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/boa-0.94.14rc21/0006-buffer_escape.diff.patch b/patches/boa-0.94.14rc21/0006-buffer_escape.diff.patch new file mode 100644 index 000000000..d35e0cc9c --- /dev/null +++ b/patches/boa-0.94.14rc21/0006-buffer_escape.diff.patch @@ -0,0 +1,39 @@ +From b46d216b3673246e7299a22dfb88a8f0d7538e5a Mon Sep 17 00:00:00 2001 +From: debian.org <debian.org> +Date: Mon, 22 Feb 2010 23:14:35 +0100 +Subject: [PATCH 6/6] buffer_escape.diff + +http://ftp.de.debian.org/debian/pool/main/b/boa/boa_0.94.14rc21-3.1.diff.gz +--- + src/buffer.c | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/src/buffer.c b/src/buffer.c +index 3663725..0a23f58 100644 +--- a/src/buffer.c ++++ b/src/buffer.c +@@ -77,6 +77,7 @@ int req_write_escape_http(request * req, const char *msg) + char c, *dest; + const char *inp; + ++ int skip = 0; + int left; + inp = msg; + dest = req->buffer + req->buffer_end; +@@ -84,7 +85,12 @@ int req_write_escape_http(request * req, const char *msg) + * in the middle of a transfer of up to 3 bytes */ + left = BUFFER_SIZE - req->buffer_end; + while ((c = *inp++) && left >= 3) { +- if (needs_escape((unsigned int) c)) { ++ /* Lower the skip character count. */ ++ if (skip) skip--; ++ /* If we have a '%', we skip the two follow characters. */ ++ if (c == '%') skip = 2; ++ ++ if (!skip && needs_escape((unsigned int) c)) { + *dest++ = '%'; + *dest++ = INT_TO_HEX((c >> 4) & 0xf); + *dest++ = INT_TO_HEX(c & 0xf); +-- +1.7.0 + |