You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@locus.apache.org on 2000/08/09 16:01:53 UTC

cvs commit: httpd-docs-1.3/apidoc dict-AP_MODULE_MAGIC_AT_LEAST.html dict-MODULE_MAGIC_AT_LEAST.html dict-ap_document_root.html dict-ap_field_noparam.html dict-ap_fnmatch.html TODO api.list dict-MODULE_MAGIC_NUMBER.html dict-request_rec.html

coar        00/08/09 07:01:53

  Modified:    apidoc   TODO api.list dict-MODULE_MAGIC_NUMBER.html
                        dict-request_rec.html
  Added:       apidoc   dict-AP_MODULE_MAGIC_AT_LEAST.html
                        dict-MODULE_MAGIC_AT_LEAST.html
                        dict-ap_document_root.html
                        dict-ap_field_noparam.html dict-ap_fnmatch.html
  Log:
  	Some more additions and updates to the 1.3 API docco.
  
  Revision  Changes    Path
  1.8       +1 -9      httpd-docs-1.3/apidoc/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/apidoc/TODO,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- TODO	2000/07/31 12:11:25	1.7
  +++ TODO	2000/08/09 14:01:51	1.8
  @@ -1,12 +1,5 @@
   The following need to be added to api.list:
  -MODULE_MAGIC_NUMBER_MAJOR
  -MODULE_MAGIC_NUMBER_MINOR
  -MODULE_MAGIC_COOKIE
  -AP_MODULE_MAGIC_AT_LEAST
   TARGET
  -HTTP_VERSION
  -HTTP_VERSION_MAJOR
  -HTTP_VERSION_MINOR
   DEFAULT_INDEX
   DEFAULT_CONTENT_TYPE
   DEFAULT_PATH
  @@ -423,11 +416,9 @@
   ap_default_type
   ap_die
   ap_discard_request_body
  -ap_document_root
   ap_each_byterange
   ap_error_log2stderr
   ap_exists_scoreboard_image
  -ap_field_noparam
   ap_finalize_request_protocol
   ap_finalize_sub_req_protocol
   ap_find_command
  @@ -598,6 +589,7 @@
   regex_t
   regmatch_t
   scoreboard
  +SECURITY_HOLE_PASS_AUTHORIZATION
   server_addr_rec
   short_score
   uri_components
  
  
  
  1.25      +126 -6    httpd-docs-1.3/apidoc/api.list
  
  Index: api.list
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/apidoc/api.list,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -u -r1.24 -r1.25
  --- api.list	2000/07/31 12:30:46	1.24
  +++ api.list	2000/08/09 14:01:51	1.25
  @@ -187,7 +187,7 @@
       NULL,                       /* child_exit */ \n \
       NULL                        /* post read-request */ \n \
   }; \
  -    |SA-module\
  +    |SA-module,SA-MMN,STANDARD_MODULE_STUFF\
       |dict-$*.html
   R|ap_add_module\
       |void $*(module *m);\
  @@ -944,7 +944,7 @@
   #;
   X|SA-compileflags\
       |BIG_SECURITY_HOLE,DEFAULT_ADMIN,DOCUMENT_LOCATION,DYNAMIC_MODULE_LIMIT\
  -     ,HARD_SERVER_LIMIT,HTTPD_ROOT\
  +     ,HARD_SERVER_LIMIT,HTTPD_ROOT,SECURITY_HOLE_PASS_AUTHORIZATION\
       |\
       |\
       |
  @@ -979,6 +979,11 @@
       |env CFLAGS="-Wall -D$*=\"/usr/httpd\"" ./configure\
       |SA-compileflags\
       |dict-$*.html
  +C|SECURITY_HOLE_PASS_AUTHORIZATION\
  +    |Compile-time definition\
  +    |env CFLAGS="-Wall -D$*" ./configure\
  +    |SA-compileflags\
  +    |dict-$*.html
   #;
   #; Tables..
   #;
  @@ -1180,7 +1185,12 @@
       |dict-$*.html
   R|ap_find_pool\
       |pool *$*(const void *ts);\
  -    |\
  +    |pool *p;\n\
  +p = $*((const void *)r->content_type);\n\
  +if (p == NULL) { \n \
  +    /* r->content_type is either NULL, a constant, \n \
  +     * or in memory allocated using some other method than pools */ \n \
  +}\
       |SA-pool\
       |dict-$*.html
   R|ap_pool_is_ancestor\
  @@ -2153,11 +2163,49 @@
       |\
       |\
       |dict-$*.html
  -R|ap_fnmatch\
  -    |int $*(const char *s1, const char *s2, int n);\
  +X|SA-fnmatch\
  +    |ap_fnmatch,FNM_NOMATCH,FNM_NOESCAPE,FNM_PATHNAME,FNM_PERIOD\
  +     ,FNM_CASE_BLIND\
  +    |\
  +    |\
  +    |
  +C|FNM_NOMATCH\
  +    |#define $* 1\
       |\
  +    |SA-fnmatch\
  +    |dict-$*.html
  +C|FNM_NOESCAPE\
  +    |#define $* 0x01\
  +    |\
  +    |SA-fnmatch\
  +    |dict-$*.html
  +C|FNM_PATHNAME\
  +    |#define $* 0x02\
       |\
  +    |SA-fnmatch\
       |dict-$*.html
  +C|FNM_PERIOD\
  +    |#define $* 0x04\
  +    |\
  +    |SA-fnmatch\
  +    |dict-$*.html
  +C|FNM_CASE_BLIND\
  +    |#define $* 0x08\
  +    |\
  +    |SA-fnmatch\
  +    |dict-$*.html
  +R|ap_fnmatch\
  +    |int $*(const char *pattern, const char *string, int flags);\
  +    |#include "fnmatch.h"\n\
  +    int fnflags = 0;\n\
  +#ifdef WIN32\n\
  +    fnflags |= FNM_CASE_BLIND;\n\
  +#endif\n\
  +    if (ap_fnmatch("index.html", r->filename, fnflags) == 0) { \n \
  +        return OK; \n \
  +    }\
  +    |SA-fnmatch\
  +    |dict-$*.html
   R|ap_force_library_loading\
       |void $*(void)\
       |\
  @@ -3170,11 +3218,67 @@
       |struct process_chain *p;\np->kill_how = kill_never; \
       |\
       |dict-$*.html
  +X|SA-MMN\
  +    |MODULE_MAGIC_NUMBER,MODULE_MAGIC_NUMBER_MAJOR,MODULE_MAGIC_NUMBER_MINOR\
  +     ,MODULE_MAGIC_COOKIE,MODULE_MAGIC_AT_LEAST,AP_MODULE_MAGIC_AT_LEAST\
  +     ,module\
  +    |\
  +    |\
  +    |
   C|MODULE_MAGIC_NUMBER\
       |#define $* <var>monotonically-increasing-value</var>\
  -    |module *m;\nif (m-&gt;version != MODULE_MAGIC_NUMBER)\n    exit(1);\
  +    |module *m;\nif (m-&gt;version != $*)\n    exit(1);\n}\
  +    |SA-MMN\
  +    |dict-$*.html
  +C|MODULE_MAGIC_NUMBER_MAJOR\
  +    |#define $* <var>integer-value</var>\
       |\
  +    |SA-MMN\
  +    |dict-$*.html
  +C|MODULE_MAGIC_NUMBER_MINOR\
  +    |#define $* <var>integer-value</var>\
  +    |\
  +    |SA-MMN\
  +    |dict-$*.html
  +C|MODULE_MAGIC_COOKIE\
  +    |#define $* <var>opaque-value</var>\
  +    |\
  +    |SA-MMN\
  +    |dict-$*.html
  +M|AP_MODULE_MAGIC_AT_LEAST\
  +    |#define $*(major,minor)           \ \n \
  +    ((major) &lt; MODULE_MAGIC_NUMBER_MAJOR                \ \n \
  +     &#124;&#124; ((major) == MODULE_MAGIC_NUMBER_MAJOR           \ \n \
  +         &amp;&amp; (minor) &lt;= MODULE_MAGIC_NUMBER_MINOR))\
  +    |    request_rec *r; \n \
  +    char *x;\n \
  +#if $*(19990320,4) \n \
  +    x = ap_field_noparam(r-&gt;pool, ap_table_get(r-&gt;headers_in, "X-attr")\
  +); \n \
  +#else\n \
  +    char *y;\n \
  +    x = ap_table_get(r-&gt;headers_in, "X-attr"); \n \
  +    y = strstr(x, ";"); \n \
  +    *y = '\0'; \n \
  +#endif\
  +    |SA-MMN\
       |dict-$*.html
  +M|MODULE_MAGIC_AT_LEAST\
  +    |<i>Obsolete</i>\
  +    |\
  +    |SA-MMN\
  +    |dict-$*.html
  +M|STANDARD_MODULE_STUFF\
  +    |#define $*  MODULE_MAGIC_NUMBER_MAJOR, \ \n \
  +                               MODULE_MAGIC_NUMBER_MINOR, \ \n \
  +                               -1, \ \n \
  +                               __FILE__, \ \n \
  +                               NULL, \ \n \
  +                               NULL, \ \n \
  +                               MODULE_MAGIC_COOKIE \
  +    |\
  +    |SA-MMN\
  +    |dict-$*.html
   C|SERVER_SUPPORT\
       |#define $* "http://www.apache.org/"\
       |ap_snprintf(buf, sizeof(buf), "For further assistance, go to $*");\
  @@ -3240,6 +3344,7 @@
        ,HTTP_VARIANT_ALSO_VARIES,HTTP_PROCESSING,HTTP_RANGE_NOT_SATISFIABLE\
        ,HTTP_EXPECTATION_FAILED,HTTP_UNPROCESSABLE_ENTITY,HTTP_LOCKED\
        ,HTTP_FAILED_DEPENDENCY,HTTP_INSUFFICIENT_STORAGE,HTTP_NOT_EXTENDED\
  +     ,HTTP_VERSION,HTTP_VERSION_MAJOR,HTTP_VERSION_MINOR\
       |\
       |\
       |
  @@ -3540,6 +3645,21 @@
   #; These are macros, but they are invoked as though they were routines -
   #; so that's how we list them.
   #;
  +M|HTTP_VERSION\
  +    |#define $*(major,minor) (1000*(major)+(minor))\
  +    |\
  +    |SA-httpcodes\
  +    |dict-$*.html
  +M|HTTP_VERSION_MAJOR\
  +    |#define $*(number) ((number)/1000)\
  +    |\
  +    |SA-httpcodes\
  +    |dict-$*.html
  +M|HTTP_VERSION_MINOR\
  +    |#define $*(number) ((number)%1000)\
  +    |\
  +    |SA-httpcodes\
  +    |dict-$*.html
   M|ap_is_HTTP_INFO\
       |#define $*(x) (((x) &gt;= 100) &amp;&amp; ((x) &lt; 200))\
       |request_rec *r;\nif (!$*(r-&gt;status)) { \n \
  
  
  
  1.3       +10 -2     httpd-docs-1.3/apidoc/dict-MODULE_MAGIC_NUMBER.html
  
  Index: dict-MODULE_MAGIC_NUMBER.html
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/apidoc/dict-MODULE_MAGIC_NUMBER.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- dict-MODULE_MAGIC_NUMBER.html	2000/07/24 22:13:51	1.2
  +++ dict-MODULE_MAGIC_NUMBER.html	2000/08/09 14:01:51	1.3
  @@ -1,5 +1,13 @@
   <p>
  -This constant represents an APACHE server module API version. Modules should
  +In versions of Apache prior to 1.3.3,
  +this constant represented an Apache server module API version.  Modules should
   have a version member of their internal module structure which matches the
  -MODULE_MAGIC_NUMBER of the Apache source base they'll run with.
  +<code>MODULE_MAGIC_NUMBER</code> of the Apache source base with which they'll
  +run.
  +</p>
  +<p>
  +This constant was obsoleted in Apache 1.3.3 by the
  +<code>MODULE_MAGIC_NUMBER_MAJOR</code> and
  +<code>MODULE_MAGIC_NUMBER_MINOR</code> constants and the
  +<code>AP_MODULE_MAGIC_AT_LEAST</code> macro (<i>q.q.v.</i>).
   </p>
  
  
  
  1.5       +33 -0     httpd-docs-1.3/apidoc/dict-request_rec.html
  
  Index: dict-request_rec.html
  ===================================================================
  RCS file: /home/cvs/httpd-docs-1.3/apidoc/dict-request_rec.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- dict-request_rec.html	2000/07/31 12:11:29	1.4
  +++ dict-request_rec.html	2000/08/09 14:01:52	1.5
  @@ -77,16 +77,49 @@
     server has been configured to recognise the method (such as with
     the <code>Script</code> directive).</dd>
    <dt><code><b>int allowed</b></code></dt>
  + <dd>This is a bitmask of the HTTP methods permitted for the resource.  The
  +  module that generates the response content needs to set this; it should
  +  do so before or during the content generation phase, before the response
  +  header is sent.  This mask is
  +  used solely to create the <code>Allowed</code> response header field.
  +  It's a good idea to set it in an earlier phase if possible, in case
  +  the request method is <code>OPTIONS</code> and will be handled by the
  +  <code>default_handler</code>.</dd>
    <dt><code><b>int sent_bodyct</b></code></dt>
  + <dd>This field is reserved for use by the core server.</dd>
    <dt><code><b>long bytes_sent</b></code></dt>
  + <dd>This field is reserved for use by the core server.  At the completion
  +  of the request it contains the number of bytes sent as the response body;
  +  it does not include the bytes in the response header.  It is primarily
  +  used by logging modules.</dd>
    <dt><code><b>time_t mtime</b></code></dt>
  + <dd>This field contains the last-modified time for the current
  +  document.  It should be set with the <code>ap_update_mtime()</code>
  +  or <code>ap_rationalize_mtime()</code> routines.</dd>
    <dt><code><b>int chunked</b></code></dt>
  + <dd>This field is reserved for use by the core server.  It is a Boolean
  +  value indicating whether the response is being sent using chunked
  +  encoding.</dd>
    <dt><code><b>int byterange</b></code></dt>
  + <dd>This field contains the number of distinct byte-ranges in the request
  +  header's <code>Range</code> field.</dd>
    <dt><code><b>char *boundary</b></code></dt>
  + <dd>The delimiting string used in multipart or byterange bodies.</dd>
    <dt><code><b>const char *range</b></code></dt>
  + <dd>The value of the request's <code>Range</code> header field.  This
  +  is stored here for convenience; it is also available in the
  +  <code>headers_in</code> table described below.</dd>
    <dt><code><b>long clength</b></code></dt>
  + <dd>The actual length in bytes of the response body.  Set with the
  + <code>ap_set_content_length()</code> routine.</dd>
    <dt><code><b>long remaining</b></code></dt>
  + <dd>The number of bytes in the request body that have not yet been read.
  +  This is updated by the server core each time a module asks the server
  +  core for more of the body.  Modules must regard it as a read-only field.</dd>
    <dt><code><b>long read_length</b></code></dt>
  + <dd>Similar to the <code>remaining</code> field described above, this
  +  field contains the count of bytes already read from the request bosy.
  +  Modules must regard this as a read-only field.</dd>
    <dt><code><b>int read_body</b></code></dt>
    <dt><code><b>int read_chunked</b></code></dt>
    <dt><code><b>unsigned expecting_100</b></code></dt>
  
  
  
  1.1                  httpd-docs-1.3/apidoc/dict-AP_MODULE_MAGIC_AT_LEAST.html
  
  Index: dict-AP_MODULE_MAGIC_AT_LEAST.html
  ===================================================================
  <p>
  The <code>AP_MODULE_MAGIC_AT_LEAST</code> macro is used to test
  the feature level of the base Apache server against which a module
  is being built.  This allows the module to use <code>#if</code>
  preprocessor blocks to take advantage of recent API enhancements
  without losing the ability to compile successfully against older
  versions of the server.
  </p>
  
  
  
  1.1                  httpd-docs-1.3/apidoc/dict-MODULE_MAGIC_AT_LEAST.html
  
  Index: dict-MODULE_MAGIC_AT_LEAST.html
  ===================================================================
  <p>
  This macro has been replaced by the <code>AP_MODULE_MAGIC_AT_LEAST</code>
  macro, which both has namespace protection (<i>via</i> the <code>AP_</code>
  prefix) and works correctly -- which the <code>MODULE_MAGIC_AT_LEAST</code>
  macro did not.
  </p>
  <p>
  <code>MODULE_MAGIC_AT_LEAST</code> is listed here solely for completeness,
  as it might be encountered in older modules.  It should <i>not</i>
  be used; the <code>AP_MODULE_MAGIC_AT_LEAST</code> macro should always
  be used instead in new modules.
  </p>
  
  
  
  1.4       +3 -2      httpd-docs-1.3/apidoc/dict-ap_document_root.html
  
  
  
  
  1.1                  httpd-docs-1.3/apidoc/dict-ap_field_noparam.html
  
  Index: dict-ap_field_noparam.html
  ===================================================================
  <p>
  The <code>ap_field_noparam()</code> treats the string it is given
  as an HTTP field value.  It searches the string for the parameter
  delimiter (";") and removes it, the trailing text, and any whitespace
  tht preceeds it, copying the result into the supplied pool.  A
  pointer to the edited copy of the string is the return value.
  </p>
  <p>
  A major use of this routine is in content-type comparisons,
  since the <code>Content-type</code> header field frequently
  includes parameters such as "<code>;charset=Big5</code>".
  The routine strips such additional information from the
  string, permitting a straightforward comparison of Internet
  media types.
  </p>
  
  
  
  1.4       +12 -0     httpd-docs-1.3/apidoc/dict-ap_fnmatch.html