[Xitami] LRWP and HTTP_REFERER

Paul Osze paul_osze at comcast.net
Mon Jun 26 00:45:28 CEST 2006


I've combed through the archives and have seen this issue come up
in relation to PHP as well. Namely, Xitami does not see to be passing
the full HTTP_REFERER value to the CGI environment (or the LRWP
environment).

Is there any way to get the full HTTP_REFERER (including query string
info passed after the ? in the url) in an LRWP process? Here is the C-code
snippet I've been using:

  for (symbol=lrwp.cgi->symbols; symbol; symbol=symbol->next) {
    if(strcmp(symbol->name,"PATH_INFO") == 0) { 
strcpy(path_info,symbol->value); }
    if(strcmp(symbol->name,"HTTP_REFERER") == 0) { 
strcpy(http_referer,symbol->value); }
    if(strcmp(symbol->name,"SERVER_NAME") == 0) { 
strcpy(server_name,symbol->value); }
    if(strcmp(symbol->name,"HTTP_USER_AGENT") == 0) { 
strcpy(http_user_agent,symbol->value); }
    if(strcmp(symbol->name,"HTTP_COOKIE") == 0) { 
strcpy(http_cookie,symbol->value); }
    if(strcmp(symbol->name,"REMOTE_ADDR") == 0) { 
strcpy(remote_addr,symbol->value); }
  }






More information about the Xitami mailing list