SAMP and HTTPS workaround?

Mark Taylor M.B.Taylor at bristol.ac.uk
Tue Sep 3 11:26:14 CEST 2019


Sébastien,

On Mon, 2 Sep 2019, Sebastien Derriere wrote:

> Le 22/08/2019 à 15:05, Mark Taylor a écrit :
> > I have written such a helper application, and I'd be interested
> > to know if anyone wants to try it out: especially data providers
> > who are using HTTPS and want to allow users to load tables/images
> > using SAMP.  Would this be an acceptable solution?
> > 
> > You can find the application here:
> > 
> >     http://andromeda.star.bris.ac.uk/websamp/sampload.jar
> > 
> > If you run, e.g. "java -jar sampload.jar /tmp/tmpfile.vot"
> > then it will pop up a window asking which VOTable-capable
> > SAMP client you want to send tmpfile.vot to.
> > (It works out what kind of file it is by looking at the content).
> > 
> > Unless your OS/browser can execute jar files directly, to use it with
> > a browser you'll need to accompany it with a small shell script or
> > equivalent like
> > 
> >     #!/bin/sh
> >     java -jar /path/to/sampload.jar "$@"
> > 
> Hi Mark,
> 
> I was trying to use you helper application. It works fine in most cases, but
> I run into a problem with some special path/filenames.
> 
> The default with modern Linux systems and the french locale is that some
> directories use special chars (I hate it, but it's the default now). So my
> "Download" directory is named "Téléchargements" (with the accents, yes), and
> if I try to pass a FITS file located in such a directory to your samp loader,
> it fails :
> 
> It opens a "Send error" window, with the following message :
> Send failure Bad SAMP string; contains character 0xe9
> 
> And sure enough, the 0xe9 is é.
> I haven't found a way to escape the filename yet. Do you enforce a strict
> regexp on filenames ?

Good catch, thanks for spotting this.  I have added the required
percent-encoding so that these filenames can be represented as
SAMP-friendly URL strings.  I hope that Téléchargements is OK now.
Can you try again?  The updated jar file is at the same place
(http://andromeda.star.bris.ac.uk/websamp/sampload.jar)

Mark

--
Mark Taylor   Astronomical Programmer   Physics, Bristol University, UK
m.b.taylor at bris.ac.uk +44-117-9288776  http://www.star.bris.ac.uk/~mbt/


More information about the apps-samp mailing list