*** xmms-1.2.8/Input/mpg123/http.c Tue Sep 2 15:01:38 2003 --- xmms-1.2.8-p/Input/mpg123/http.c Thu Sep 11 10:39:41 2003 *************** *** 149,154 **** --- 149,173 ---- *pass = NULL; h = ptr; } + + // Support for [host]:port format (RFC 2732) + *host = NULL; + + // Check for [ADDR] format + pt = strchr(ptr, '['); + if (pt != NULL) { + char* tempptr; + + pt++; + + tempptr = strchr(pt, ']'); + if (tempptr) { + *tempptr = '\0'; + *host = g_strdup(pt); + ptr = tempptr+1; + } + } + pt = strchr(ptr, ':'); if (pt != NULL && (f == NULL || pt < f)) { *************** *** 161,167 **** *f = '\0'; *port = 80; } ! *host = g_strdup(h); if (f) *filename = g_strdup(f + 1); --- 180,188 ---- *f = '\0'; *port = 80; } ! ! if (!*host) ! *host = g_strdup(h); if (f) *filename = g_strdup(f + 1);