myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-250


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. v0.9.2-250-gdfdc6a1
Date: Thu, 27 May 2010 15:46:40 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  dfdc6a1d856b83d9fe598c50007e565a24275e49 (commit)
      from  2a1142ee58090b6750a85531789568b15b9a88e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit dfdc6a1d856b83d9fe598c50007e565a24275e49
Author: Giuseppe Scrivano <address@hidden>
Date:   Thu May 27 15:31:03 2010 +0200

    Now `HttpDir::formatHtml' considers different ranges.

diff --git a/myserver/src/http_handler/http_dir/http_dir.cpp 
b/myserver/src/http_handler/http_dir/http_dir.cpp
index 72fa5d4..e2f06c6 100644
--- a/myserver/src/http_handler/http_dir/http_dir.cpp
+++ b/myserver/src/http_handler/http_dir/http_dir.cpp
@@ -616,22 +616,22 @@ void HttpDir::formatHtml (string& in, string& out)
   string::size_type pos = 0;
   out.assign (in);
   /*
-    Replace characters in the ranges 32-65 91-96 123-126 160-255
+    Replace characters in the ranges 32-47 58-64 123-126 160-255
     with "&#CODE;".
    */
   for (pos = 0; out[pos] != '\0'; pos++)
     {
-      if (((u_char)out[pos] >= 32
-           && (u_char)out[pos] <= 65)
-          || ((u_char)out[pos] >= 91
-              && (u_char)out[pos] <= 96)
-          || ((u_char)out[pos] >= 123
-              && (u_char)out[pos] <= 126)
-          || ((u_char)out[pos] >= 160
-              && (u_char)out[pos] < 255))
+      if (((u_char) out[pos] >= 32
+           && (u_char) out[pos] <= 47)
+          || ((u_char) out[pos] >= 58
+              && (u_char) out[pos] <= 64)
+          || ((u_char) out[pos] >= 123
+              && (u_char) out[pos] <= 126)
+          || ((u_char) out[pos] >= 160
+              && (u_char) out[pos] < 255))
         {
           ostringstream os;
-          os << "&#" << (int)((unsigned char)out[pos]) << ";";
+          os << "&#" << (int)((unsigned char) out[pos]) << ";";
           out.replace (pos, 1, os.str ());
           pos += os.str ().length () - 1;
         }

-----------------------------------------------------------------------

Summary of changes:
 myserver/src/http_handler/http_dir/http_dir.cpp |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU MyServer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]