summaryrefslogtreecommitdiff
path: root/websvcs
diff options
context:
space:
mode:
Diffstat (limited to 'websvcs')
-rw-r--r--websvcs/lib/Makefile8
-rw-r--r--websvcs/lib/URL_Addr.cpp33
-rw-r--r--websvcs/lib/URL_Addr.i5
-rw-r--r--websvcs/tests/Makefile12
4 files changed, 35 insertions, 23 deletions
diff --git a/websvcs/lib/Makefile b/websvcs/lib/Makefile
index 127a1ade77e..5b1ac0069ea 100644
--- a/websvcs/lib/Makefile
+++ b/websvcs/lib/Makefile
@@ -47,15 +47,21 @@ endif # SUPPRESS_DASH_G
$(ACE_ROOT)/ace/ACE.h \
$(ACE_ROOT)/ace/OS.h \
$(ACE_ROOT)/ace/inc_user_config.h \
+ $(ACE_ROOT)/ace/config.h \
+ $(ACE_ROOT)/ace/config-sunos5.5.h \
+ $(ACE_ROOT)/ace/config-g++-common.h \
$(ACE_ROOT)/ace/streams.h \
$(ACE_ROOT)/ace/Basic_Types.h \
$(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
$(ACE_ROOT)/ace/OS.i \
+ $(ACE_ROOT)/ace/Trace.h \
$(ACE_ROOT)/ace/Log_Msg.h \
$(ACE_ROOT)/ace/Log_Record.h \
$(ACE_ROOT)/ace/ACE.i \
$(ACE_ROOT)/ace/Log_Priority.h \
+ $(ACE_ROOT)/ace/SString.h \
+ $(ACE_ROOT)/ace/SString.i \
+ $(ACE_ROOT)/ace/Malloc_Base.h \
$(ACE_ROOT)/ace/Log_Record.i \
$(ACE_ROOT)/ace/Addr.h \
$(ACE_ROOT)/ace/Addr.i \
diff --git a/websvcs/lib/URL_Addr.cpp b/websvcs/lib/URL_Addr.cpp
index 53d71e504e5..23de49c704b 100644
--- a/websvcs/lib/URL_Addr.cpp
+++ b/websvcs/lib/URL_Addr.cpp
@@ -200,8 +200,7 @@ ACE_HTTP_Addr::ACE_HTTP_Addr (LPCTSTR host_name,
}
ACE_HTTP_Addr::ACE_HTTP_Addr (const ACE_HTTP_Addr &addr)
- : ACE_URL_Addr (),
- hostname_ (0),
+ : hostname_ (0),
port_number_ (0),
path_ (0),
query_ (0)
@@ -270,7 +269,7 @@ ACE_HTTP_Addr::set (const ACE_HTTP_Addr &addr)
return 0;
}
-void
+void
ACE_HTTP_Addr::clear (void)
{
if (this->hostname_ != 0)
@@ -286,7 +285,7 @@ ACE_HTTP_Addr::url_size (int flags) const
{
// Notice that we cannot hard-code the value because the size in
// wchar's may be different.
- size_t size =
+ size_t size =
+ sizeof (ASYS_TEXT ("http://"))
+ sizeof (ASYS_TEXT ("/:?")); // separators
@@ -320,7 +319,7 @@ path_copy (LPCTSTR begin,
LPTSTR& target,
LPCTSTR src)
{
- // Copy one character at a time, if we find a /../ we go back to the
+ // Copy one character at a time, if we find a /../ we go back to the
// previous '/'
for (; *src != 0; ++src)
{
@@ -377,7 +376,7 @@ ACE_HTTP_Addr::create_relative_address (LPCTSTR url) const
ASYS_TCHAR [n],
0);
- // We copy the contens of <path> into <buf>; but simplifying the
+ // We copy the contens of <path> into <buf>; but simplifying the
// path, to avoid infinite loop like:
// "foo/../foo/../foo/../foo/../foo/index.html"
//
@@ -451,7 +450,8 @@ ACE_HTTP_Addr::string_to_addr (LPCTSTR address)
LPCTSTR string = address;
string += http_size;
- string += 2; // == strlen ("//");
+ ASYS_TCHAR separator[] = ASYS_TEXT("//");
+ string += sizeof(separator)/sizeof(separator[0]) - 1;
// Make a copy of the string to manipulate it.
ACE_ALLOCATOR_RETURN (this->hostname_, ACE_OS::strdup (string), -1);
@@ -473,7 +473,7 @@ ACE_HTTP_Addr::string_to_addr (LPCTSTR address)
}
ACE_ALLOCATOR_RETURN (this->path_, ACE_OS::strdup (path_start), -1);
}
-
+
// By now t is null terminated at the start of the path, find the
// port (if present).
ASYS_TCHAR *port_start = ACE_OS::strchr(this->hostname_, ':');
@@ -496,7 +496,7 @@ ACE_HTTP_Addr::addr_to_string (LPTSTR buffer,
{
if (size < this->url_size (flags))
return -1;
-
+
if (this->hostname_ == 0)
return -1;
@@ -511,7 +511,7 @@ ACE_HTTP_Addr::addr_to_string (LPTSTR buffer,
{
n += ACE_OS::sprintf (buffer + n, "%s", this->hostname_);
}
-
+
if (this->port_number_ != ACE_DEFAULT_HTTP_PORT)
{
n += ACE_OS::sprintf (buffer + n, ":%d", this->port_number_);
@@ -556,8 +556,7 @@ ACE_FTP_Addr::ACE_FTP_Addr (LPCTSTR host_name,
}
ACE_FTP_Addr::ACE_FTP_Addr (const ACE_FTP_Addr& addr)
- : ACE_URL_Addr (),
- user_ (0),
+ : user_ (0),
passwd_ (0),
hostname_ (0),
path_ (0)
@@ -640,7 +639,7 @@ ACE_FTP_Addr::url_size (int flags) const
{
// Notice that we cannot hard-code the value because the size in
// wchar's may be different.
- size_t size =
+ size_t size =
+ sizeof (ASYS_TEXT ("ftp://"))
+ sizeof (ASYS_TEXT ("@:/")); // separators
@@ -722,7 +721,8 @@ ACE_FTP_Addr::string_to_addr (LPCTSTR address)
LPCTSTR string = address;
string += ftp_size;
- string += 2; // == strlen ("//");
+ ASYS_TCHAR separator[] = ASYS_TEXT("//");
+ string += sizeof(separator)/sizeof(separator[0]) - 1;
// Make a copy of the string to manipulate it.
ASYS_TCHAR *t;
@@ -844,7 +844,7 @@ ACE_Mailto_Addr::set (const ACE_Mailto_Addr &addr)
return 0;
}
-void
+void
ACE_Mailto_Addr::clear (void)
{
if (this->user_ != 0)
@@ -889,7 +889,7 @@ ACE_Mailto_Addr::addr_to_string (LPTSTR buffer,
n += ACE_OS::sprintf (buffer + n, ASYS_TEXT ("?%s"),
this->headers_);
}
-
+
return 0;
}
@@ -947,3 +947,4 @@ ACE_Mailto_Addr::accept (ACE_URL_Addr_Visitor* visitor)
{
return visitor->visit (this);
}
+
diff --git a/websvcs/lib/URL_Addr.i b/websvcs/lib/URL_Addr.i
index fe07bdf5a59..6d4d03d300c 100644
--- a/websvcs/lib/URL_Addr.i
+++ b/websvcs/lib/URL_Addr.i
@@ -4,8 +4,7 @@
ACE_INLINE
ACE_URL_Addr::ACE_URL_Addr (const ACE_URL_Addr& address)
- : ACE_Addr (),
- url_ (address.url_ == 0 ? 0 : ACE_OS::strdup (address.url_))
+ : url_ (address.url_ == 0 ? 0 : ACE_OS::strdup (address.url_))
{
}
@@ -31,7 +30,7 @@ ACE_URL_Addr::set_url (LPTSTR url)
this->url_ = url;
}
-ACE_INLINE u_long
+ACE_INLINE u_long
ACE_URL_Addr::hash (void) const
{
return ACE::hash_pjw (this->url_);
diff --git a/websvcs/tests/Makefile b/websvcs/tests/Makefile
index 28412f212b5..cdd9a16c3fc 100644
--- a/websvcs/tests/Makefile
+++ b/websvcs/tests/Makefile
@@ -13,8 +13,6 @@ BIN = Test_URL_Addr
LSRC = $(addsuffix .cpp,$(BIN))
-LDLIBS := -lwebsvcs
-
BUILD = $(VBIN)
#----------------------------------------------------------------------------
@@ -28,6 +26,8 @@ include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+VLDLIBS := -lwebsvcs $(VLDLIBS)
+
# To build multiple executables in the same directory on AIX, it works
# best to wipe out any previously-created tempinc directory.
# The compiler/linker isn't too smart about instantiating templates...
@@ -51,15 +51,21 @@ endif
$(ACE_ROOT)/ace/ACE.h \
$(ACE_ROOT)/ace/OS.h \
$(ACE_ROOT)/ace/inc_user_config.h \
+ $(ACE_ROOT)/ace/config.h \
+ $(ACE_ROOT)/ace/config-sunos5.5.h \
+ $(ACE_ROOT)/ace/config-g++-common.h \
$(ACE_ROOT)/ace/streams.h \
$(ACE_ROOT)/ace/Basic_Types.h \
$(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
$(ACE_ROOT)/ace/OS.i \
+ $(ACE_ROOT)/ace/Trace.h \
$(ACE_ROOT)/ace/Log_Msg.h \
$(ACE_ROOT)/ace/Log_Record.h \
$(ACE_ROOT)/ace/ACE.i \
$(ACE_ROOT)/ace/Log_Priority.h \
+ $(ACE_ROOT)/ace/SString.h \
+ $(ACE_ROOT)/ace/SString.i \
+ $(ACE_ROOT)/ace/Malloc_Base.h \
$(ACE_ROOT)/ace/Log_Record.i \
$(ACE_ROOT)/ace/Addr.h \
$(ACE_ROOT)/ace/Addr.i \