Decode the route policy in the debug dump too, and call it MOD - #156
Merged
Conversation
#146 fixed the HTTPDSRV field table; http_debug() has the same dump and was left behind. ?debug=cgi printed the legacy login byte and none of the four fields the per-route auth policy added in #98, and unlike /.dsrv there is no hex alongside to fall back on -- for /zosmf/info the whole answer was "Login=0", which is precisely the thing that does not decide the request. Measured on the live system, that route carries auth = 1 (HTTP_AUTH_NONE): httpd does not gate it at all and its 401 comes from mvsMF's own auth. The dump now names auth, and the RES= gate when a route carries one. Both are shown as text, not numbers, for the same reason as in the field table: neither value reads the way it looks. Auth=DEFAULT means the route had no AUTH= keyword and inherits the global LOGIN policy, and resattr 0 is the unset value racf_auth() takes as READ. This is a one-line-per-route trace rather than a field table, so DEFAULT is explained once in the header instead of on every line. login keeps its place, marked legacy, because it is still in the block. MOD= and LOC= entries are told apart by pgm, which a program-less static route leaves NULL -- the old dump printed Program="(none)" and left the reader to work out what that meant. The vocabulary follows the keywords: the option is ?debug=mod, the heading is "Route Table", the help line names the route table, and dump_cgi() is dump_route(). No alias for the old spelling, consistent with target=CGI in #146 -- there are no consumers, the output goes inside an HTML comment. An unrecognised debug option is a silent no-op, so a stale ?debug=cgi yields an empty comment rather than an error. Fixes #155
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #155
Follow-up to #146 / #153, on the second surface:
http_debug()'s route dump.What it printed before
loginis the legacy byte at+09;auth,resattr,resclass,resnamewere not printed at all. Unlike/.dsrvthere is no hex dump alongside, so for/zosmf/infothe entire answer wasLogin=0— and that route carriesauth = 1(HTTP_AUTH_NONE), measured live while verifying #153. httpd does not gate it; its 401 comes from mvsMF's own auth track. The old dump could not express that distinction at all.What it prints now
authandresattras text, not numbers — same reasoning as the field table:AUTH=DEFAULTis not "no authentication" andresattr0 is not "no access". This is a one-line-per-route trace rather than a table, soDEFAULTis explained once in the header instead of on every line.Res=/Attr=appear only on routes that carry aRES=gate, so the common case stays short and no NULL is dereferenced.MOD/LOCtold apart bypgm != NULL. The old dump printedProgram="(none)"and left the reader to infer it.loginkeeps its place, marked(legacy)— it is still in the block.The keyword decision
?debug=cgi→?debug=mod, no alias, consistent with howtarget=CGIwas settled in #146: there are no consumers, and this output goes inside an HTML comment. Worth knowing: an unrecognised debug option is a silent no-op inhttp_debug(), so a stale?debug=cgiproduces an empty<!-- -->rather than an error. That was the trade-off in the alternative (keepingcgias an alias), and it was decided against.Also renamed: heading
CGI Table→Route Table, the help line, anddump_cgi()→dump_route().Verification
makeclean under-Wall -Werror, all six modules link. Compile-only — the rendered output has not been seen, and CI does not execute anything either.The dump is reached through
QUERY_DEBUG(httppc.c:133) on any request that reachesCSTATE_DONE, so the live check after deploy is:and the route lines should appear in the trailing HTML comment, with
/zosmf/inforeadingAuth=NONErather thanLogin=0.