changeset 7330:2f3fe8274028

Applied patch from Gregory Kovriga <gkovriga@techunix.technion.ac.il> - Url was not properly parsed if an @ was in the file path.
author bertrand
date Mon, 09 Sep 2002 04:16:16 +0000
parents 9129781e5939
children 7ec253a97341
files libmpdemux/url.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/url.c	Sun Sep 08 23:00:01 2002 +0000
+++ b/libmpdemux/url.c	Mon Sep 09 04:16:16 2002 +0000
@@ -57,6 +57,11 @@
 
 	// check if a username:password is given
 	ptr2 = strstr(ptr1, "@");
+	ptr3 = strstr(ptr1, "/");
+	if( ptr3!=NULL && ptr3<ptr2 ) {
+		// it isn't really a username but rather a part of the path
+		ptr2 = NULL;
+	}
 	if( ptr2!=NULL ) {
 		// We got something, at least a username...
 		int len = ptr2-ptr1;