Преглед изворни кода

2008-06-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Fixed the bug that UTF-8 encoded URL is not URL-encoded 
properly.
	* src/Request.cc
Tatsuhiro Tsujikawa пре 17 година
родитељ
комит
f36e1b34c2
2 измењених фајлова са 6 додато и 1 уклоњено
  1. 5 0
      ChangeLog
  2. 1 1
      src/Request.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-06-30  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Fixed the bug that UTF-8 encoded URL is not URL-encoded properly.
+	* src/Request.cc
+	
 2008-06-30  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Cleaned up configure.ac.

+ 1 - 1
src/Request.cc

@@ -185,7 +185,7 @@ void Request::urlencode(std::string& result, const std::string& src) const
   result = src+"  ";
   size_t index = lastIndex;
   while(index-- > 0) {
-    const char c = result[index];
+    const unsigned char c = result[index];
     // '/' is not urlencoded because src is expected to be a path.
     if(Util::shouldUrlencode(c)) {
       if(c == '%') {