Author: adrian.chadd
Date: Mon Feb  2 12:00:35 2009
New Revision: 13790

Modified:
    branches/LUSCA_HEAD/src/url.c

Log:
Remove another strBuf() call


Modified: branches/LUSCA_HEAD/src/url.c
==============================================================================
--- branches/LUSCA_HEAD/src/url.c       (original)
+++ branches/LUSCA_HEAD/src/url.c       Mon Feb  2 12:00:35 2009
@@ -609,8 +609,8 @@
  urlMakeAbsolute(request_t * req, const char *relUrl)
  {
      char *urlbuf;
-    const char *path, *last_slash;
      size_t urllen, pathlen;
+    const char *path, *last_slash;

      if (req->method->code == METHOD_CONNECT) {
        return (NULL);
@@ -641,7 +641,7 @@
      if (relUrl[0] == '/') {
        strncpy(&urlbuf[urllen], relUrl, MAX_URL - urllen - 1);
      } else {
-       path = strBuf(req->urlpath);
+       path = stringDupToC(&req->urlpath);
        last_slash = strrchr(path, '/');
        if (last_slash == NULL) {
            urlbuf[urllen++] = '/';
@@ -658,6 +658,7 @@
                strncpy(&urlbuf[urllen], relUrl, MAX_URL - urllen - 1);
            }
        }
+       safe_free(path);
      }

      return (urlbuf);

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to