class

Analyzer::C::Libmicrohttpd

Inherits CEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object

GNU libmicrohttpd. There is no route registration: MHD_start_daemon takes one access handler that receives every request's url and method, and routes, if at all, by comparing them:

if (0 == strcmp(url, "/login") && 0 == strcmp(method, "POST")) { ... }

Each such URI comparison is a route (strncmp a prefix one). A daemon whose handler never compares the URI serves every path, reported as / with the handler's methods and params. Table-driven dispatch (strcmp(pages[i].url, url)) and handlers defined in another file are not followed.

Constants

COMPARE_RE = /\bstrn?(?:case)?cmp\s*\(/
DAEMON_RE = /\bMHD_start_daemon\s*\(/
URI_ARG_RE = /(?:\b|_)ur[il](?:\b|_)/i

Class methods

tech_name
Source

Instance methods

analyze_file(path : String) : Array(Endpoint)
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source