Fossil

Check-in [ccd6c879b4]
Login

Check-in [ccd6c879b4]

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

Overview
Comment:Removed the special-cased addition of g.zExtra==parameter named "name" when running in JSON mode because it causes no end of grief in several JSON handlers and none of the handlers rely on that handling.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ccd6c879b4442c57acbf95118f0b7371613645a7
User & Date: stephan 2012-03-18 02:15:46.319
Context
2012-03-18
02:45
Added name_to_uuid2() ... (check-in: c685a35eb0 user: stephan tags: trunk)
02:15
Removed the special-cased addition of g.zExtra==parameter named "name" when running in JSON mode because it causes no end of grief in several JSON handlers and none of the handlers rely on that handling. ... (check-in: ccd6c879b4 user: stephan tags: trunk)
2012-03-17
17:53
Version 1.22 ... (check-in: f7e215bcac user: drh tags: trunk, release, version-1.22)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
1308
1309
1310
1311
1312
1313
1314






1315



1316
1317



1318
1319
1320
1321
1322
1323
1324
    break;
  }
  if( g.zExtra ){
    /* CGI parameters get this treatment elsewhere, but places like getfile
    ** will use g.zExtra directly.
    ** Reminder: the login mechanism uses 'name' differently, and may
    ** eventually have a problem/collision with this.






    */



    dehttpize(g.zExtra);
    cgi_set_parameter_nocopy("name", g.zExtra);



  }

  /* Locate the method specified by the path and execute the function
  ** that implements that method.
  */
  if( name_search(g.zPath, aWebpage, count(aWebpage), &idx) &&
      name_search("not_found", aWebpage, count(aWebpage), &idx) ){







>
>
>
>
>
>

>
>
>
|
|
>
>
>







1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
    break;
  }
  if( g.zExtra ){
    /* CGI parameters get this treatment elsewhere, but places like getfile
    ** will use g.zExtra directly.
    ** Reminder: the login mechanism uses 'name' differently, and may
    ** eventually have a problem/collision with this.
    **
    ** Disabled by stephan when running in JSON mode because this
    ** particular parameter name is very common and i have had no end
    ** of grief with this handling. The JSON API never relies on the
    ** handling below, and by disabling it in JSON mode i can remove
    ** lots of special-case handling in several JSON handlers.
    */
#ifdef FOSSIL_ENABLE_JSON
    if(!g.json.isJsonMode){
#endif
      dehttpize(g.zExtra);
      cgi_set_parameter_nocopy("name", g.zExtra);
#ifdef FOSSIL_ENABLE_JSON
    }
#endif
  }

  /* Locate the method specified by the path and execute the function
  ** that implements that method.
  */
  if( name_search(g.zPath, aWebpage, count(aWebpage), &idx) &&
      name_search("not_found", aWebpage, count(aWebpage), &idx) ){