Maggi Federico wrote:
> 
> The functions/lines I am interested in are those somehow involved in  
> handling HTTP request/session/response parameters. Of course, I allow  
> a certain roughness in the analysis.
> 
> I am trying to build a list of such functions/lines. What would you  
> suggest to include? What would you grep for if you want to estimate  
> the functions that are, even indirectly, related to processing of HTTP  
> requests/sessions/responses?

Does "HTTP responses" include content generation?  I'm going to assume 
not, since otherwise something most of the codebase will qualify.

The WebRequest instance describing the current request is kept in the 
global variable $wgRequest -- you may want to grep for that, or for 
methods specific to the WebRequest class.  You'll find that a lot of 
code uses that class to access things like URL parameters, though.

There's also a WebResponse class (available via $wgRequest->response()), 
but it doesn't really do much (just duplicates the PHP header() function 
and provides a wrapper around setcookie() which seems to be called from 
exactly one place in the code).  Anyway, you should catch any uses of it 
by grepping for $wgRequest, but you should also grep for the standard 
PHP header() and setcookie() functions.

The WebRequest class also provides functions for accessing session data, 
but they don't actually seem to be used -- everything just accesses the 
PHP superglobal $_SESSION array directly.

Also, note that all this is true for the main UI code.  The API code 
(found in api.php and under includes/api) and the AJAX code 
(includes/Ajax*.php) may do things somewhat differently.

-- 
Ilmari Karonen

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to