[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
Re: IUCr Web services
- To: epc-l@iucr.org
- Subject: Re: IUCr Web services
- From: Brian McMahon <bm@iucr.org>
- Date: Fri, 12 Dec 1997 17:11:41 +0000
Dear Yves >> I should still like to see queries to the SinCris database returning >> pages with relative links, so the Swedish site, for example, could >> query the SinCris database and have pages returned with the Swedish >> logo and links to other files on the Swedish machine. This must be >> possible (as is done with the Chester pages). > > One again I do not see how to do that: > - the resulting HTML page for a query is build dynamically, thus: > Assuming a mirror site M and a client C somewhere else: > - C asks a query from the index page provided by M. > - C sends a query to Paris which cannot know that a previous query was > made by C to M. It *is* possible. The CGI protocol includes an environment variable, HTTP_REFERER, defined as "the URL of the document that the client points to before accessing the CGI program". So C requests an index page from mirror M, with URL M//mmm. From this page, a query is generated to Paris with a set of CGI environment variables, including $HTTP_REFERER, which has a value of M//mmm (even though the query comes from C). Paris reads the value of this variable, strips off the mmm bit, and substitutes M// in any absolute URLs that it returns to C. Sometimes the original CGI program needs to invoke subsequent programs, but it encodes the M// in some other variable that it passes as an argument to its daughter programs. Even if the original index page is itself generated dynamically, the process that does that can inherit the HTTP_REFERER value from its calling page. There will be cases when HTTP_REFERER can't be resolved, if the CGI process is invoked directly and not from an existing form or index page. In those cases, enter a default value (the Paris address, probably). But for most cases where people traverse a sequence of pages with well-defined URLs, the location of the invoking page is accessible. Regards Brian
Reply to: [list | sender only]
- Prev by Date: SInCris software list
- Next by Date: Re: IUCr Web services
- Prev by thread: Re: IUCr Web services
- Next by thread: Mirror sites for IUCr W3 services
- Index(es):