This site requires JavaScript, please enable it in your browser!
Greenfoot back
davmac
davmac wrote ...

2015/7/23

Site News

davmac davmac

2015/7/23

#
Hi everyone, I just wanted to let you all know that I've finally solved (I think!) the problem where clicking on a notification (from the notification star near the top right of the page) would display a page of un-rendered HTML code. Normally you had to do a refresh in your browser to make the page display properly. I looked into this problem previously, but it was complex and I was unable to resolve it (other than making sure it wasn't an issue in the code which runs the site). For anyone interested in the technical details: We use the Apache webserver, which is the true "internet facing" server. The Apache server reverse-proxies connections to Puma, which is another web server which is written (mostly) in Ruby. On the Puma server, Greenfoot.org runs as a Ruby-on-Rails application, which is actually running on JRuby which itself runs on the Java virtual machine). Part of the reason that this took so long to solve is because I did not know where in that chain the issue originated! Was it in Apache (which seemed unlikely, though the problem often went away if we took Apache out of the chain), or Puma, or Rails, or the Greenfoot.org application itself, or even in JRuby? As it turns out the problem is in Puma - it wasn't properly processing certain types of HTTP response, and it just so happened that clicking on the notification star causes a simple request to our server (just to let it know that your latest notifications have been seen) which generates an empty response body - exactly the type of response that causes the issue in Puma. Fortunately, after discovering the bug in the Puma code, I realised that the bug has in fact already been fixed in the upstream Puma codebase, a mere 6 days earlier! That means that the next version of Puma should not exhibit this problem. In the meantime I've borrowed the fix and applied it our local copy of Puma, so the problem is already gone from the website :). Thanks for your patience in putting up with this issue for so long.
wabuilderman wabuilderman

2015/7/23

#
Thanks!
You need to login to post a reply.