[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] URL's with spaces


I've noticed something similar, when calling p2 APIs, such as to add a property for p2.mirrorURL URL ... if you provide an escaped '&', you end up with & ... which later, of course, is invalid.

  # remember, the '&' should NOT be XML escaped here ... the p2 api (or underlying xml) will escape it.
  MIRRORURL_ARG="http://www.eclipse.org/downloads/download.php?format=xml&file=${MIRRORURL}"

I've never looked at the underlying code that does this, but suspect it's not so much "by design" as simply "quick and easy" parsing? Perhaps based on the assumption that the "input" need not be XML ... but in at least in most cases the output is?





From:        Thomas Hallgren <thomas@xxxxxxx>
To:        P2 developer discussions <p2-dev@xxxxxxxxxxx>,
Date:        07/16/2014 11:27 AM
Subject:        [p2-dev] URL's with spaces
Sent by:        p2-dev-bounces@xxxxxxxxxxx




I tried to use a URL that contained %20 (escaped space). The Eclipse installer fails to read the repository if I paste
that URL into it:

 
http://geppetto-jenkins.puppetlabs.com/job/Geppetto%20Dev/lastSuccessfulBuild/artifact/geppetto.p2.repository

If I however replace the '%20' with a space, then everything works OK. It seems like the installer escapes the escapes.

Is this per design? It seems a bit awkward that I cannot do "Copy Link Location" in the browser and then paste it into
the installer without first manually replacing all escapes.

- thomas

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/p2-dev