summaryrefslogtreecommitdiff
path: root/ACE/apps/JAWS2/HTTP_10.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/apps/JAWS2/HTTP_10.cpp')
-rw-r--r--ACE/apps/JAWS2/HTTP_10.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/ACE/apps/JAWS2/HTTP_10.cpp b/ACE/apps/JAWS2/HTTP_10.cpp
new file mode 100644
index 00000000000..60ebdc8b17f
--- /dev/null
+++ b/ACE/apps/JAWS2/HTTP_10.cpp
@@ -0,0 +1,32 @@
+// $Id$
+
+#include "HTTP_10.h"
+
+#include "JAWS/JAWS.h"
+
+ACE_RCSID(PROTOTYPE, HTTP_10, "$Id$")
+
+char *
+JAWS_HTTP_10_Helper::HTTP_decode_string (char *path)
+{
+ // replace the percentcodes with the actual character
+ int i, j;
+ char percentcode[3];
+
+ for (i = j = 0; path[i] != '\0'; i++, j++)
+ {
+ if (path[i] == '%')
+ {
+ percentcode[0] = path[++i];
+ percentcode[1] = path[++i];
+ percentcode[2] = '\0';
+ path[j] = (char) ACE_OS::strtol (percentcode, (char **) 0, 16);
+ }
+ else
+ path[j] = path[i];
+ }
+
+ path[j] = path[i];
+
+ return path;
+}