[Genome] url to password protected track file
Galt Barber
galt at soe.ucsc.edu
Wed Apr 2 10:40:49 PDT 2008
The syntax for URLs that pass the username and password is this:
http://user:password@server.com/path/file?options
but the additional trick here is that this url is inside
the main url (it's just the value of hgt.customText)
therefore you need to also escape that url.
Here is a link on the url escape mechanism:
http://www.december.com/html/spec/esccodes.html
and you can write your own little routine for escaping,
or probably there is one in the code libraries
available to you.
Ah, here's a free online URL-encoder that
you could use manually:
http://www.motobit.com/util/url-encoder.asp
-Galt
On Wed, 2 Apr 2008, Ashish Agarwal wrote:
> Hi. I am trying to construct a url that references files on our password
> protected server. For example:
>
> http://genome.ucsc.edu/cgi-bin/hgTracks?db=ce4&position=chrI&hgt.customText=http://myserver.org/file.wig
>
> However, myserver.org requires a password and an "Authorization Required"
> message is displayed on the top the genome browser page. In the list
> archives, I found a message stating that the format
>
> protocol://user:password at server.com/somepath
>
> can be used, but I cannot get this to work. What exactly is the syntax? I
> tried providing "protocol://user:password at myserver.org/file.wig" as the
> value for hgt.customText but that does not work. Without the quotes, I get
> an "Unrecognized format" error. With the quotes, no error message is
> displayed but neither is the track.
>
> Thank you in advance for any help.
> _______________________________________________
> Genome maillist - Genome at soe.ucsc.edu
> http://www.soe.ucsc.edu/mailman/listinfo/genome
>
More information about the Genome
mailing list