Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37670

Re: Embed an applet served by pluginfile.php

$
0
0
by Luis de la Torre.  

Yup, using the URL"http://localhost/pluginfile.php/25/mod_ejsapp/jarfile/5/ejs_FallingBall.jar" in my web-browser works. It inmediatly opens a window to accept the download of the jar file.

No messages appear in the error.log file and, in the access.log file only this one is written:

127.0.0.1 - - [28/Apr/2013:13:09:17 +0200] "GET /pluginfile.php/25/mod_ejsapp/jarfile/5/ejs_FallingBall.jar HTTP/1.1" 200 1184763 "-""Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0"

Which is ok.

The difference to the case in which I am embedding the applet is that HEAD is used instead of GET. I think that might be related to the problem: somehow, it seems HEAD method is not working perfectly fine for serving jar files, while GET does, of course.

Regarding lines 1954 and 4250 in my filelib.php file, these are them:

1951 function send_file_not_found() {
1952     global $CFG, $COURSE;
1953     send_header_404();
1954     print_error('filenotfound', 'error', $CFG->wwwroot.'/course/view.php?id='.$COURSE->id); //this is not displayed on IIS??
1955 }

4250 send_file_not_found();

But it seems to me these errors happen because, for some reason, the HEAD method is looking inside the applet and trying to serve some of the files that are in there (such as DefaullState.out in this example), rather than just serving the whole .jar file without caring about what's inside of it (just like the GET method seems to do).


Viewing all articles
Browse latest Browse all 37670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>