Commit deb7ee64 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

Begin to move functions from the http module to the core. The goal is to

have only functions that are HTTP specific in the http directory.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88341 13f79535-47bb-0310-9956-ffa450edef68
parent 2139c260
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
Changes with Apache 2.0.14-dev

  *) Begin to move protocol independant functions out of mod_http.  The goal
     is to have only functions that are HTTP specific in the http directory.
     [Ryan Bloom]

Changes with Apache 2.0.13

  *) Don't assume that there will always be multiple calls to the byterange 
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ INSTALL = $(abs_srcdir)/build/install.sh -c
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_PROGRAM = $(INSTALL) -m 755

DEFS = -I. -I$(srcdir) -I$(top_srcdir)/server/mpm/$(MPM_NAME)
DEFS = -I. -I$(srcdir) -I$(top_srcdir)/server/mpm/$(MPM_NAME) -I$(top_srcdir)/modules/http

# Suffixes

+27 −21
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@
#include "apr_portable.h"
#include "apr_mmap.h"
#include "apr_buckets.h"
#include "util_filter.h"

#ifdef __cplusplus
extern "C" {
@@ -85,25 +86,6 @@ extern "C" {
 */ 
request_rec *ap_read_request(conn_rec *c);

/**
 * Send the minimal part of an HTTP response header.
 * @param r The current request
 * @param bb The brigade to add the header to.
 * @warning Modules should be very careful about using this, and should 
 *          prefer ap_send_http_header().  Much of the HTTP/1.1 implementation 
 *          correctness depends on code in ap_send_http_header().
 * @deffunc void ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb)
 */
AP_DECLARE(void) ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb);

/**
 * Send the Status-Line and header fields for HTTP response
 * @param r The current request
 * @deffunc void ap_send_http_header(request_rec *r)
 */
AP_DECLARE(void) ap_send_http_header(request_rec *r);


/* Finish up stuff after a request */

/**
@@ -159,6 +141,19 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r);
 */
AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime);

/**
 * Build the content-type that should be sent to the client from the
 * content-type specified.  The following rules are followed:
 *    - if type is NULL, type is set to ap_default_type(r)
 *    - if charset adding is disabled, stop processing and return type.
 *    - then, if there are no parameters on type, add the default charset
 *    - return type
 * @param r The current request
 * @return The content-type
 * @deffunc const char *ap_make_content_type(request_rec *r, const char *type);
 */ 
AP_DECLARE(const char *) ap_make_content_type(request_rec *r, const char *type);

/**
 * Construct an entity tag from the resource information.  If it's a real
 * file, build in some of the file characteristics.
@@ -436,8 +431,6 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, int bufsiz);
AP_DECLARE(int) ap_discard_request_body(request_rec *r);


/* Sending a byterange */

/**
 * Setup the output headers so that the client knows how to authenticate
 * itself the next time, if an authentication request failed.  This function
@@ -596,6 +589,19 @@ AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error,
                const char *buf, apr_pool_t *p);

AP_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f, apr_bucket_brigade *b);
AP_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f, apr_bucket_brigade *b);
AP_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *,
                                                              apr_bucket_brigade *);
AP_DECLARE_NONSTD(apr_status_t) ap_old_write_filter(ap_filter_t *f, apr_bucket_brigade *b);

/*
 * Setting up the protocol fields for subsidiary requests...
 * Also, a wrapup function to keep the internal accounting straight.
 */
void ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r);
void ap_finalize_sub_req_protocol(request_rec *sub_r);
                                                                                
#ifdef __cplusplus
}
#endif
+4 −0
Original line number Diff line number Diff line
@@ -354,6 +354,10 @@ SOURCE=.\server\error_bucket.c
# End Source File
# Begin Source File

SOURCE=.\server\protocol.c
# End Source File
# Begin Source File

SOURCE=.\server\rfc1413.c
# End Source File
# Begin Source File
+2 −0
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@
#include "http_main.h"
#include "http_request.h"

#include "mod_core.h"

#define ASIS_MAGIC_TYPE "httpd/send-as-is"

static int asis_handler(request_rec *r)
Loading