summaryrefslogtreecommitdiff
path: root/websvcs
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-22 18:08:00 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-22 18:08:00 +0000
commit4f30f9945061f253eea08f616addddf72d184731 (patch)
tree35fd2730a537e12fc011527dbc6d6badc4ff48ea /websvcs
parent590db8ee5a9d6af9daac56e013b69a91b302bcad (diff)
downloadATCD-4f30f9945061f253eea08f616addddf72d184731.tar.gz
ChangeLogTag:Tue Jun 22 13:07:19 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'websvcs')
-rw-r--r--websvcs/lib/URL_Addr.cpp27
-rw-r--r--websvcs/lib/URL_Addr.i5
2 files changed, 17 insertions, 15 deletions
diff --git a/websvcs/lib/URL_Addr.cpp b/websvcs/lib/URL_Addr.cpp
index da35bf38e2e..53d71e504e5 100644
--- a/websvcs/lib/URL_Addr.cpp
+++ b/websvcs/lib/URL_Addr.cpp
@@ -200,7 +200,8 @@ ACE_HTTP_Addr::ACE_HTTP_Addr (LPCTSTR host_name,
}
ACE_HTTP_Addr::ACE_HTTP_Addr (const ACE_HTTP_Addr &addr)
- : hostname_ (0),
+ : ACE_URL_Addr (),
+ hostname_ (0),
port_number_ (0),
path_ (0),
query_ (0)
@@ -269,7 +270,7 @@ ACE_HTTP_Addr::set (const ACE_HTTP_Addr &addr)
return 0;
}
-void
+void
ACE_HTTP_Addr::clear (void)
{
if (this->hostname_ != 0)
@@ -285,7 +286,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
@@ -319,7 +320,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)
{
@@ -376,7 +377,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"
//
@@ -472,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_, ':');
@@ -495,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;
@@ -510,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_);
@@ -555,7 +556,8 @@ ACE_FTP_Addr::ACE_FTP_Addr (LPCTSTR host_name,
}
ACE_FTP_Addr::ACE_FTP_Addr (const ACE_FTP_Addr& addr)
- : user_ (0),
+ : ACE_URL_Addr (),
+ user_ (0),
passwd_ (0),
hostname_ (0),
path_ (0)
@@ -638,7 +640,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
@@ -842,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)
@@ -887,7 +889,7 @@ ACE_Mailto_Addr::addr_to_string (LPTSTR buffer,
n += ACE_OS::sprintf (buffer + n, ASYS_TEXT ("?%s"),
this->headers_);
}
-
+
return 0;
}
@@ -945,4 +947,3 @@ 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 6d4d03d300c..fe07bdf5a59 100644
--- a/websvcs/lib/URL_Addr.i
+++ b/websvcs/lib/URL_Addr.i
@@ -4,7 +4,8 @@
ACE_INLINE
ACE_URL_Addr::ACE_URL_Addr (const ACE_URL_Addr& address)
- : url_ (address.url_ == 0 ? 0 : ACE_OS::strdup (address.url_))
+ : ACE_Addr (),
+ url_ (address.url_ == 0 ? 0 : ACE_OS::strdup (address.url_))
{
}
@@ -30,7 +31,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_);