Le mardi 3 août 2010 10:41:22, vous avez écrit :
> Hello,

        Hi !

> I'm using
> 
> set("harbor.password","tèstdepass&à")
> 
> Next I'm trying to connect using Shoutcast DSP (from winamp) with this
> password. I get an invalid password.

Ok, its basically the same issue as for the metadata sent by shoutcast DSP. 
Encoding is iso 8859 and harbor did not try to decode this to utf8.

I have just commited a patch which is attached here. It will try to recode 
those informations to utf8. However, again, charset detection can be wrong so 
it will work in some cases, like the password you give here but not for some 
others like "éàè"..

All in all, I would advise your shoutcast DSP users to choose passwords 
without special chars..

Patch added to the stack of candidates for a bugfix release btw :)

Cheers,
Romain
Index: sources/harbor_input.ml
===================================================================
--- sources/harbor_input.ml	(révision 7393)
+++ sources/harbor_input.ml	(copie de travail)
@@ -278,6 +278,23 @@
          in
          let auth_function = List.assoc "auth" p in
          let login user pass =
+           (** We try to decode user & password here. 
+             * Idealy, it would be better to decode them
+             * in tools/harbor.ml in order to use any
+             * possible charset information there.
+             * However: 
+             * - ICY password are given raw, without
+             *   any charset information
+             * - HTTP password are encoded in Base64 and 
+             *   passed through the HTTP headers, where
+             *   there are no charset information concerning
+             *   the password. Note: Content-Type may contain
+             *   a charset information, but this refers to 
+             *   the charset of the HTML content.. *)
+           let user,pass = 
+              let f = Configure.recode_tag in
+              f user, f pass
+           in
            let user_login test_user test_pass =
              let user,pass =
                let f g x = match x with "" -> g | _ -> x in
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to