dgaudet 97/07/07 19:09:37
Modified: src http_request.c http_request.h Log: Add is_initial_request function. Revision Changes Path 1.59 +12 -0 apache/src/http_request.c Index: http_request.c =================================================================== RCS file: /export/home/cvs/apache/src/http_request.c,v retrieving revision 1.58 retrieving revision 1.59 diff -C3 -r1.58 -r1.59 *** http_request.c 1997/07/08 02:04:44 1.58 --- http_request.c 1997/07/08 02:09:36 1.59 *************** *** 1131,1133 **** --- 1131,1145 ---- new->content_type = r->content_type; process_request_internal (new); } + + /* if we return TRUE here, + * it is the initial main request, which we only get *once* per HTTP request + */ + + int is_initial_req(request_rec *r) + { + return + (r->main == NULL) /* otherwise, this is a sub-request */ + && + (r->prev == NULL); /* otherwise, this is an internal redirect */ + } 1.11 +1 -0 apache/src/http_request.h Index: http_request.h =================================================================== RCS file: /export/home/cvs/apache/src/http_request.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C3 -r1.10 -r1.11 *** http_request.h 1997/01/01 18:10:22 1.10 --- http_request.h 1997/07/08 02:09:36 1.11 *************** *** 84,89 **** --- 84,90 ---- void internal_redirect (const char *new_uri, request_rec *); void internal_redirect_handler (const char *new_uri, request_rec *); int some_auth_required (request_rec *r); + int is_initial_req(request_rec *r); #ifdef CORE_PRIVATE /* Function called by main.c to handle first-level request */