Fossil

Check-in [d01b3c953f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the CGI so that it works again with Apache.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d01b3c953fefc6f610a9a66229aef110cc96438a
User & Date: drh 2013-08-15 03:43:49.711
Context
2013-08-15
05:29
Fix documentation typo. ... (check-in: 14a378fd0b user: mistachkin tags: trunk)
03:43
Fix the CGI so that it works again with Apache. ... (check-in: d01b3c953f user: drh tags: trunk)
02:59
Rig the timeline graph so that CSS of the form: "#canvas{color:#000;}" will set the color of the graph lines and boxes. ... (check-in: e412f97999 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/cgi.c.
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
  g.isHTTP = 1;
  cgi_destination(CGI_BODY);
  if( zRequestUri==0 ) malformed_request("missing REQUEST_URI");
  if( zScriptName==0 ) malformed_request("missing SCRIPT_NAME");
  if( cgi_parameter("PATH_INFO",0)==0 ){
    int i, j;
    for(i=0; zRequestUri[i]==zScriptName[i] && zRequestUri[i]; i++){}
    if( zRequestUri[i]=='/' ){
      for(j=i; zRequestUri[j] && zRequestUri[j]!='?'; j++){}
      cgi_set_parameter("PATH_INFO", mprintf("%.*s", j-i, zRequestUri+i));
    }else{
      malformed_request("cannot compute PATH_INFO from REQUEST_URI"
                        " and SCRIPT_NAME");
    }
  }

  z = (char*)P("HTTP_COOKIE");
  if( z ){
    z = mprintf("%s",z);
    add_param_list(z, ';');
  }







<
|
|
<
<
<
<







835
836
837
838
839
840
841

842
843




844
845
846
847
848
849
850
  g.isHTTP = 1;
  cgi_destination(CGI_BODY);
  if( zRequestUri==0 ) malformed_request("missing REQUEST_URI");
  if( zScriptName==0 ) malformed_request("missing SCRIPT_NAME");
  if( cgi_parameter("PATH_INFO",0)==0 ){
    int i, j;
    for(i=0; zRequestUri[i]==zScriptName[i] && zRequestUri[i]; i++){}

    for(j=i; zRequestUri[j] && zRequestUri[j]!='?'; j++){}
    cgi_set_parameter("PATH_INFO", mprintf("%.*s", j-i, zRequestUri+i));




  }

  z = (char*)P("HTTP_COOKIE");
  if( z ){
    z = mprintf("%s",z);
    add_param_list(z, ';');
  }