瀏覽代碼

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 == '%') {