A
Andrew Thompson
There is a new mime-type check applet available.
The applet can be configured by URL query parameters,
and provides a text field to specify an User-Agent string
for those servers that (sensibly) refuse connections to
clients that identify themselves as 'null'.
Code: (LGPL - though not explicitly stated in the source)
<http://pscode.org/javadoc/src-html/org/pscode/mime/MimeType.html>
Homepage: <http://pscode.org/mime/>
Help: <http://pscode.org/mime/help.html>
Config. : <http://pscode.org/mime/form.html>
Questions:
1) Does the applet work for you? *
2) Any suggestions on improving the code?
3) At the moment, only URLs that return a response
code of 200 (HTTP status OK) are checked, should I
allow an 'override' of that in case there are other
response codes that make it worth doing the check
anyway?
4) In the 'help' files, I use HTML forms to represent
the applet. Here (in my FF) they look very similar to
the applet itself, is that the same for you?
5) Any suggestions on improving the help page?
* Tests.
Here are a couple of tests pre-configured by URL,
but feel free to visit the form and make up your own.
Sandboxed
Tracker sound player JNLP off my site.
<http://pscode.org/mime/applet.html?media.url=http://pscode.org
%2Flib%2Ftracker-all.jnlp&mime.type=application%2Fx-java-jnlp-
file&ua.string=>
Expect message 1:
"Served type
'application/x-java-jnlp-file'
matches one of the expected types."
Non-existent resource.
<http://pscode.org/mime/applet.html?media.url=http://pscode.org
%2Fno.jnlp&mime.type=application%2Fx-java-jnlp-file&ua.string=>
Expect message 2:
"Response Code: 404.
Cannot proceed!"
Trusted.
Knute Johnson's Image Fader example JNLP
<http://pscode.org/mime/applet.html?media.url=http:/
%2Frabbitbrush.frazmtn.com%2Ffader.jnlp&mime.type=application%2Fx-java-
jnlp-file&ua.string=>
Message 1
John B. Matthews' AlphaComposite example JNLP
<http://pscode.org/mime/applet.html?media.url=http:/
%2Fsites.google.com%2Fsite%2Fdrjohnbmatthews%2Fcomposite
%2FAlphaComposite.jnlp%3Fattredirects%3D0&mime.type=application%2Fx-
java-jnlp-file&ua.string=>
Message 1 (I am surprised that site allowed
'null' UA clients! Was expecting a '503'.)
The applet can be configured by URL query parameters,
and provides a text field to specify an User-Agent string
for those servers that (sensibly) refuse connections to
clients that identify themselves as 'null'.
Code: (LGPL - though not explicitly stated in the source)
<http://pscode.org/javadoc/src-html/org/pscode/mime/MimeType.html>
Homepage: <http://pscode.org/mime/>
Help: <http://pscode.org/mime/help.html>
Config. : <http://pscode.org/mime/form.html>
Questions:
1) Does the applet work for you? *
2) Any suggestions on improving the code?
3) At the moment, only URLs that return a response
code of 200 (HTTP status OK) are checked, should I
allow an 'override' of that in case there are other
response codes that make it worth doing the check
anyway?
4) In the 'help' files, I use HTML forms to represent
the applet. Here (in my FF) they look very similar to
the applet itself, is that the same for you?
5) Any suggestions on improving the help page?
* Tests.
Here are a couple of tests pre-configured by URL,
but feel free to visit the form and make up your own.
Sandboxed
Tracker sound player JNLP off my site.
<http://pscode.org/mime/applet.html?media.url=http://pscode.org
%2Flib%2Ftracker-all.jnlp&mime.type=application%2Fx-java-jnlp-
file&ua.string=>
Expect message 1:
"Served type
'application/x-java-jnlp-file'
matches one of the expected types."
Non-existent resource.
<http://pscode.org/mime/applet.html?media.url=http://pscode.org
%2Fno.jnlp&mime.type=application%2Fx-java-jnlp-file&ua.string=>
Expect message 2:
"Response Code: 404.
Cannot proceed!"
Trusted.
Knute Johnson's Image Fader example JNLP
<http://pscode.org/mime/applet.html?media.url=http:/
%2Frabbitbrush.frazmtn.com%2Ffader.jnlp&mime.type=application%2Fx-java-
jnlp-file&ua.string=>
Message 1
John B. Matthews' AlphaComposite example JNLP
<http://pscode.org/mime/applet.html?media.url=http:/
%2Fsites.google.com%2Fsite%2Fdrjohnbmatthews%2Fcomposite
%2FAlphaComposite.jnlp%3Fattredirects%3D0&mime.type=application%2Fx-
java-jnlp-file&ua.string=>
Message 1 (I am surprised that site allowed
'null' UA clients! Was expecting a '503'.)