diff options
Diffstat (limited to 'src/input/http_helper.c')
-rw-r--r-- | src/input/http_helper.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/input/http_helper.c b/src/input/http_helper.c index 4bcb734e2..f4950a084 100644 --- a/src/input/http_helper.c +++ b/src/input/http_helper.c @@ -15,11 +15,9 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA * * URL helper functions - * - * $Id: http_helper.c,v 1.9 2006/11/19 15:38:47 dgp85 Exp $ */ #ifdef HAVE_CONFIG_H @@ -28,7 +26,7 @@ #include <string.h> -#include "xine_internal.h" +#include <xine/xine_internal.h> #include "http_helper.h" int _x_parse_url (char *url, char **proto, char** host, int *port, @@ -222,30 +220,6 @@ error: return 0; } -char *_x_canonicalise_url (const char *base, const char *url) { - - size_t base_length; - char *cut, *ret; - - if ((cut = strstr (url, "://"))) - return strdup (url); - - cut = strstr (base, "://"); - if (url[0] == '/') { - /* absolute - base up to first '/' after "://", then url */ - cut = strchr (cut + 3, '/'); - } - else { - /* relative - base up to & inc. last '/', then url */ - cut = strrchr (cut, '/'); - if (cut) - ++cut; - } - base_length = cut ? (size_t)(cut - base) : strlen (base); - ret = malloc (base_length + strlen (url) + 1); - sprintf (ret, "%.*s%s", (int)base_length, base, url); - return ret; -} #ifdef TEST_URL /* |