[racket] What controls the web-server continuation URL?
Noel, hello.
On 2011 Jan 17, at 14:47, Noel Welsh wrote:
> I should have a better answer, but all I can think of right now is
> adding a dispatcher that captures all requests to /podcasting, and
> adding a simple dispatcher + servlet to redirect / to /podcasting. The
> web server documents dispatchers.
Many thanks for your swift response. I'm glad it's not something obvious I've missed.
However, the problem is that example.ac.uk machine is a different machine from the one the Racket server is running on. The machine that serves example.ac.uk/podcasting (the research group's main web server) is running Apache, and proxying the HTTP query (using Apache mod_proxy's ProxyPass) to the Racket server.
Thus the underlying problem is that the Racket server has no idea that its 'public' URL is different from what it thinks it is (short of perhaps rummaging through HTTP headers), and so needs to be told 'contrary to what you think you know, generate new URLs with prefix "/podcasting"'.
I thought that dispatch-rules (specifically the second function that it returns) might be the key here. I can't reliably parse all of web-server/dispatch/syntax.rkt, but it does look as if there are no suitable hooks in there.
Hmm: it might be that the solution is to run this experimental service on the main group web server, but on a different port. Do I have enough karma to persuade the admins this is a Good Idea, I wonder...?
All the best,
Norman
--
Norman Gray : http://nxg.me.uk
School of Physics and Astronomy, University of Glasgow, UK