From istvan at vivatropolis.org Mon Mar 4 22:13:04 2013 From: istvan at vivatropolis.org (Istvan Chung) Date: Mon, 04 Mar 2013 22:13:04 -0500 Subject: [Ur] 500 Internal Server Error on cached page Message-ID: <513562C0.90004@vivatropolis.org> Setup: Apache server + -protocol cgi I found today that when the generated CGI script serves the generated Javascript file which goes along with any page which uses Javascript, it works fine unless the browser has cached it, in which case the server throws 500 Internal Server Error: (from the server logs): [Mon Mar 04 21:59:44 2013] [error] [client 127.0.0.1] malformed header from script. Bad header=HTTP/1.1 304 Not Modified: appname.exe, referer: http://localhost:8080/cgi-bin/appname.exe/Appname/main Implying that the CGI page is trying to tell the client that the client's cached version is correct, but is generating the headers incorrectly. Has anyone seen this problem before/can replicate it? -- Istvan Chung From adamc at csail.mit.edu Tue Mar 5 09:33:11 2013 From: adamc at csail.mit.edu (Adam Chlipala) Date: Tue, 05 Mar 2013 09:33:11 -0500 Subject: [Ur] 500 Internal Server Error on cached page In-Reply-To: <513562C0.90004@vivatropolis.org> References: <513562C0.90004@vivatropolis.org> Message-ID: <51360227.4090404@csail.mit.edu> I've made a tiny change which should fix this problem, in the public Mercurial repository for Ur/Web. Does it work now? On 03/04/2013 10:13 PM, Istvan Chung wrote: > Setup: Apache server + -protocol cgi > > I found today that when the generated CGI script serves the generated > Javascript file which goes along with any page which uses Javascript, it > works fine unless the browser has cached it, in which case the server > throws 500 Internal Server Error: (from the server logs): > > [Mon Mar 04 21:59:44 2013] [error] [client 127.0.0.1] malformed header > from script. Bad header=HTTP/1.1 304 Not Modified: appname.exe, referer: > http://localhost:8080/cgi-bin/appname.exe/Appname/main > > Implying that the CGI page is trying to tell the client that the > client's cached version is correct, but is generating the headers > incorrectly. Has anyone seen this problem before/can replicate it? > From istvan at vivatropolis.org Tue Mar 5 17:02:49 2013 From: istvan at vivatropolis.org (Istvan Chung) Date: Tue, 05 Mar 2013 17:02:49 -0500 Subject: [Ur] 500 Internal Server Error on cached page In-Reply-To: <51366B30.4060707@vivatropolis.org> References: <51366B30.4060707@vivatropolis.org> Message-ID: <51366B89.1000005@vivatropolis.org> On 03/05/2013 09:33 AM, Adam Chlipala wrote: > I've made a tiny change which should fix this problem, in the public > Mercurial repository for Ur/Web. Does it work now? > Yes, this has fixed the problem. Thanks! -- Istvan Chung From istvan at vivatropolis.org Sat Mar 9 14:13:01 2013 From: istvan at vivatropolis.org (Istvan Chung) Date: Sat, 09 Mar 2013 14:13:01 -0500 Subject: [Ur] Body onload handlers do not cause scripts to be included Message-ID: <513B89BD.8080208@vivatropolis.org> If a page is created in which the only indicator that javascript must be used is the tag, then the compiler fails to recognize that it must insert the