You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2004/08/14 06:24:35 UTC

[patch] ap_sub_req_* args naming fix

If there are no objections I'd like to fix the naming of the arguments and 
  doxygen comments, as they seem to be a result of copy-n-paste.

ap_sub_req_*_uri  to use new_uri
ap_sub_req_*_file to use new_file

Index: include/http_request.h
===================================================================
RCS file: /home/cvs/httpd-2.0/include/http_request.h,v
retrieving revision 1.42.2.4
diff -u -r1.42.2.4 http_request.h
--- include/http_request.h	9 Feb 2004 20:54:34 -0000	1.42.2.4
+++ include/http_request.h	14 Aug 2004 04:21:23 -0000
@@ -62,21 +62,21 @@
  /**
   * Create a sub request from the given URI.  This sub request can be
   * inspected to find information about the requested URI
- * @param new_file The URI to lookup
+ * @param new_uri The URI to lookup
   * @param r The current request
   * @param next_filter The first filter the sub_request should use.  If 
this is
   *                    NULL, it defaults to the first filter for the main 
request
   * @return The new request record
- * @deffunc request_rec * ap_sub_req_lookup_uri(const char *new_file, 
const request_rec *r)
+ * @deffunc request_rec * ap_sub_req_lookup_uri(const char *new_uri, 
const request_rec *r)
   */
-AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_file,
+AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_uri,
                                                  const request_rec *r,
                                                  ap_filter_t *next_filter);

  /**
   * Create a sub request for the given file.  This sub request can be
   * inspected to find information about the requested file
- * @param new_file The URI to lookup
+ * @param new_file The file to lookup
   * @param r The current request
   * @param next_filter The first filter the sub_request should use.  If 
this is
   *                    NULL, it defaults to the first filter for the main 
request
@@ -113,15 +113,15 @@
   * Create a sub request for the given URI using a specific method.  This
   * sub request can be inspected to find information about the requested URI
   * @param method The method to use in the new sub request
- * @param new_file The URI to lookup
+ * @param new_uri The URI to lookup
   * @param r The current request
   * @param next_filter The first filter the sub_request should use.  If 
this is
   *                    NULL, it defaults to the first filter for the main 
request
   * @return The new request record
- * @deffunc request_rec * ap_sub_req_method_uri(const char *method, const 
char *new_file, const request_rec *r)
+ * @deffunc request_rec * ap_sub_req_method_uri(const char *method, const 
char *new_uri, const request_rec *r)
   */
  AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
-                                                const char *new_file,
+                                                const char *new_uri,
                                                  const request_rec *r,
                                                  ap_filter_t *next_filter);
  /**
@@ -289,8 +289,8 @@
   * @param r The current request
   * @return DONE (or HTTP_) if this contextless request was just fulfilled
   * (such as TRACE), OK if this is not a file, and DECLINED if this is a 
file.
- * The core map_to_storage (HOOK_RUN_LAST) will directory_walk and file_walk
- * the r->filename.
+ * The core map_to_storage (HOOK_RUN_REALLY_LAST) will directory_walk
+ * and file_walk the r->filename.
   *
   * @ingroup hooks
   */
Index: server/request.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/request.c,v
retrieving revision 1.121.2.13
diff -u -r1.121.2.13 request.c
--- server/request.c	9 Feb 2004 20:59:46 -0000	1.121.2.13
+++ server/request.c	14 Aug 2004 04:21:24 -0000
@@ -1567,7 +1567,7 @@


  AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
-                                                const char *new_file,
+                                                const char *new_uri,
                                                  const request_rec *r,
                                                  ap_filter_t *next_filter)
  {
@@ -1581,13 +1581,13 @@
      rnew->method = method;
      rnew->method_number = ap_method_number_of(method);

-    if (new_file[0] == '/') {
-        ap_parse_uri(rnew, new_file);
+    if (new_uri[0] == '/') {
+        ap_parse_uri(rnew, new_uri);
      }
      else {
          udir = ap_make_dirstr_parent(rnew->pool, r->uri);
          udir = ap_escape_uri(rnew->pool, udir);    /* re-escape it */
-        ap_parse_uri(rnew, ap_make_full_path(rnew->pool, udir, new_file));
+        ap_parse_uri(rnew, ap_make_full_path(rnew->pool, udir, new_uri));
      }

      /* We cannot return NULL without violating the API. So just turn this
@@ -1612,11 +1612,11 @@
      return rnew;
  }

-AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_file,
+AP_DECLARE(request_rec *) ap_sub_req_lookup_uri(const char *new_uri,
                                                  const request_rec *r,
                                                  ap_filter_t *next_filter)
  {
-    return ap_sub_req_method_uri("GET", new_file, r, next_filter);
+    return ap_sub_req_method_uri("GET", new_uri, r, next_filter);
  }

  AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(const apr_finfo_t 
*dirent,

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com