Package: skyutils Version: 2.7-1 Severity: normal Tags: patch User: [EMAIL PROTECTED] Usertags: origin-ubuntu hardy ubuntu-patch
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In Ubuntu, we've applied the attached patch to achieve the following: * Properly handle redirects if only a query part is given in the Location header. We thought you might be interested in doing the same. - -- System Information: Debian Release: lenny/sid APT prefers hardy APT policy: (500, 'hardy'), (500, 'gutsy') Architecture: amd64 (x86_64) Kernel: Linux 2.6.24-2-generic (SMP w/2 CPU cores) Locale: LANG=da_DK.UTF-8, LC_CTYPE=da_DK.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHeC/6onjfXui9pOMRAnspAKCepnK0nNO9UaPdIBNpaPTo/9FYowCgrRE8 +5V/6dxz9yrJKkWmr0nlatU= =0O3C -----END PGP SIGNATURE-----
--- skyutils-2.7.orig/src/web.c +++ skyutils-2.7/src/web.c @@ -2283,11 +2283,22 @@ if(strcmp(ptr+strlen("http://")+(ssl_mode?1:0),Host) == 0) /* If requested the root of the site */ SU_strcat(ptr,"/",len); - else + else if (*Location == '?') { i = strlen(ptr) - 1; while(i>=0) { + if(ptr[i] == '?') + { + ptr[i+1] = 0; + break; + } + i--; + } + } else { + i = strlen(ptr) - 1; + while(i>=0) + { if(ptr[i] == '/') { ptr[i+1] = 0;