Re: [gentoo-dev] What's the use of mozilla-launcher?

2006-11-13 Thread Thomas de Grenier de Latour
On Mon, 13 Nov 2006 15:17:46 -0700, "Richard Fish"
<[EMAIL PROTECTED]> wrote:

> On 11/13/06, Thomas de Grenier de Latour <[EMAIL PROTECTED]>
> wrote:
>
> Huh?  Both of the following requests are equivalent:
> 
> http://foo.bar/param-1,param-2%2Cwith%2Ccommas,param-3
> http://foo.bar/param-1%2Cparam-2%2Cwith%2Ccommas%2Cparam-3
> 

I was thinking servers were allowed to apply rewriting rules before the
url is unescaped (and thus could have turned my url into something like
http://foo.bar/script?a=param-1&b=param-2,with,commas&c=param-3 for
instance).  But i wouldn't be surprised if i am completly wrong :)

--
TGL.
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] What's the use of mozilla-launcher?

2006-11-13 Thread Aron Griffis
Matthew Kennedy wrote:  [Mon Nov 13 2006, 10:05:23AM EST]
> I'd be interested to hear what its purpose is exactly.

All of the reasons are primarily historical, and I haven't kept track
of which still apply and which don't:

- separate distribution of the launcher script from the program so
  that fixes to the script don't require emerging the entire browser

- don't confuse mozilla/thunderbird/firefox sessions

- handle multiple URLs elegantly

- catch ownership issues in the profile that lead to confusing
  bugzillas

- clean up cache files from older browser versions since they can
  cause strange UI issues

- set MOZILLA_LIBDIR and MOZ_PLUGIN_PATH so that the browser gets its
  own libraries and plugins rather than some arbitrary set from, for
  example, thunderbird

If somebody wants to consider whether these issues are thoroughly
alleviated by the official launcher scripts, or if mozilla-launcher
should be modified in some way, go ahead and post your ideas.

Aron
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] What's the use of mozilla-launcher?

2006-11-13 Thread Richard Fish

On 11/13/06, Thomas de Grenier de Latour <[EMAIL PROTECTED]> wrote:

On Mon, 13 Nov 2006 10:02:25 +0100, Alexander Skwar
Though, an other reason for not accepting this patch is that some
websites may expect URL like this one, which relies on both encoded
and raw commas: http://foo.bar/param-1,param-2%2Cwith%2Ccommas,param-3


Huh?  Both of the following requests are equivalent:

http://foo.bar/param-1,param-2%2Cwith%2Ccommas,param-3
http://foo.bar/param-1%2Cparam-2%2Cwith%2Ccommas%2Cparam-3

This is because web servers are required to process the URL and
unescape *any* '%' sequences.  So in both cases the server 'backend'
is going to see a request for:

param-1,param-2,with,commas,param-3

-Richard
--
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] What's the use of mozilla-launcher?

2006-11-13 Thread Thomas de Grenier de Latour
On Mon, 13 Nov 2006 10:02:25 +0100, Alexander Skwar
<[EMAIL PROTECTED]> wrote:

> The problem with that is, that openURL accepts two parameters and
> they are seperated with a ,. So it sees two parameters:
> http://www.spiegel.de/wirtschaft/0,1518,447923 and 00.html - 00.html
> is not a valid parameter, though. It should be something like
> new-window.

Btw, that's Mozilla bug #298960:
https://bugzilla.mozilla.org/show_bug.cgi?id=298960

> I now changed the /usr/bin/firefox script so, that it doesn't
> use mozilla-launcher anymore. Up to now, I can't find any problems.

The workaround i use here is to set MOZILLA_NEWTYPE=tab in my env, so
that the wrapper script always adds a "new-tab" parameter.

> Having had a closer "look" at this, I dislike this patch. Reason:
> Up to now firefox eventually runs the openURL remote command. Users
> might know this and might make use of this. So a user might call
> "firefox http://gentoo.org/,new-tab"; to have http://gentoo.org/
> opened in a new tab.

Imho, that a hack works at some point doesn't mean it is a supported
feature that devs should care about never breaking.

Though, an other reason for not accepting this patch is that some
websites may expect URL like this one, which relies on both encoded
and raw commas: http://foo.bar/param-1,param-2%2Cwith%2Ccommas,param-3 
Ok, it is not really likely, but i think it would be legal.

A different approach to fix this issue would be to exploits the fact
"openUrl(URL,anything)" (where "anything" is really anything, any
unknown argument, even an empty one) will actually open the "URL" in
either a tab or window depending on the user's prefs.  Thus, the
launcher script could add such a dummy argument when $MOZILLA_NEWTYPE
is not set.  But sure, it's a hack which may not work anymore in future
Firefox versions (i've not even tested it on 2.0 btw, i'm still using
1.5.something).

--
TGL.
-- 
gentoo-dev@gentoo.org mailing list



Re: [gentoo-dev] What's the use of mozilla-launcher?

2006-11-13 Thread Matthew Kennedy
Alexander Skwar <[EMAIL PROTECTED]> writes:

[...]

> loaded. Instead of http://www.spiegel.de/wirtschaft/0,1518,447923,00.html
> it would load http://www.spiegel.de/wirtschaft/0,1518,447923. Reason is, that 
> firefox executes mozilla-launcher which will eventually run 
> "mozilla-xremote-client openURL($u)". The problem with that is,
> that openURL accepts two parameters and they are seperated with
> a ,. So it sees two parameters: 
> http://www.spiegel.de/wirtschaft/0,1518,447923 and

That would be very hackish if that's what the intention there really
is.

> There's now a patch added to this bug, but I actually object
> this patch. This patch replaces , in the parameters with
> %2c (%2c = ,). At a first glance, this patch seemed somewhat
> fine.

URLs with ')' in them are also problems for mozilla-launcher.

> I'd like to suggest, that mozilla-launcher is no longer a dependency
> of firefox and is no longer used, as I fail to see, what advantages
> m-l brings.

I'd be interested to hear what its purpose is exactly.

-- 
Matthew Kennedy
Gentoo Linux Developer (Public Key 0x401903E0)
-- 
gentoo-dev@gentoo.org mailing list



[gentoo-dev] What's the use of mozilla-launcher?

2006-11-13 Thread Alexander Skwar
Hello!

A while back, I discovered that mozilla-launcher is causing problems,
when the URL contains a "," (comma); eg. 
http://www.spiegel.de/wirtschaft/0,1518,447923,00.html

In Knode/KDE, I configured, that firefox is to be used as the browser,
so that when I click on a URL, it's loaded in firefox. I did this by
modifying .kde/share/config/kdeglobals and adding/changing:

[General]
BrowserApplication=!/usr/bin/firefox

That can also somehow be done with kcontrol.

This works well - when I click on a URL, /usr/bin/firefox is run
with one parameter, which is the URL. But if the URL contains
a comma (like the example URL further up), that site isn't correctly
loaded. Instead of http://www.spiegel.de/wirtschaft/0,1518,447923,00.html
it would load http://www.spiegel.de/wirtschaft/0,1518,447923. Reason is, that 
firefox executes mozilla-launcher which will eventually run 
"mozilla-xremote-client openURL($u)". The problem with that is,
that openURL accepts two parameters and they are seperated with
a ,. So it sees two parameters: http://www.spiegel.de/wirtschaft/0,1518,447923 
and
00.html - 00.html is not a valid parameter, though. It should be
something like new-window.

When I use the "original" Firefox from mozilla.com, there's no such
problem. That is so, because the original firefox script doesn't
use openURL anymore.

I now changed the /usr/bin/firefox script so, that it doesn't
use mozilla-launcher anymore. Up to now, I can't find any problems.

What problems did I overlook? And what's actually the use of
mozilla-launcher with current firefoxes?

What would break, if mozilla-launcher is no longer used?

Cf. https://bugs.gentoo.org/show_bug.cgi?id=150404

There's now a patch added to this bug, but I actually object
this patch. This patch replaces , in the parameters with
%2c (%2c = ,). At a first glance, this patch seemed somewhat
fine.

Having had a closer "look" at this, I dislike this patch. Reason:
Up to now firefox eventually runs the openURL remote command. Users
might know this and might make use of this. So a user might call
"firefox http://gentoo.org/,new-tab"; to have http://gentoo.org/
opened in a new tab. If this patch is applied, this won't work
anymore.

I'd like to suggest, that mozilla-launcher is no longer a dependency
of firefox and is no longer used, as I fail to see, what advantages
m-l brings.

Thanks,

Alexander Skwar
-- 
Well, hey, let's just make everything into a closure, and then we'll
have our general garbage collector, installed by "use less memory".
 -- Larry Wall in <[EMAIL PROTECTED]>


-- 
gentoo-dev@gentoo.org mailing list