You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Doug MacEachern <do...@opengroup.org> on 1997/07/03 17:26:21 UTC

Re: [STATUS] 1.3

>   * add is_initial_req() function

Here's a patch against latest from-cvs with commmentation.

-Doug

*** ./http_request.c.orig	Tue Jul  1 03:00:18 1997
--- ./http_request.c	Thu Jul  3 11:24:22 1997
***************
*** 1138,1140 ****
--- 1138,1152 ----
          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 */
+ }
*** ./http_request.h.orig	Wed Jan  1 15:00:16 1997
--- ./http_request.h	Thu Jul  3 11:24:22 1997
***************
*** 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 */