On Mon, Feb 26, 2001 at 04:38:23AM -0000, [EMAIL PROTECTED] wrote:
> rbb         01/02/25 20:38:23
> 
>   Modified:    .        CHANGES libhttpd.dsp
>                build    rules.mk
>                include  http_protocol.h
>                modules/generators mod_asis.c mod_autoindex.c mod_cgid.c
>                modules/http http_protocol.c mod_core.h
>                modules/mappers mod_imap.c
>                server   Makefile.in
>                include  apr_general.h
>                network_io/unix sendrecv.c
>   Added:       server   protocol.c
>   Log:
>   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.

I don't understand this checkin at all...

mod_core.h was to be private to the mod_core module. Now it is public, yet
located in a different directory. If it is to be public, then it should just
go into httpd-2.0/include. Hell, why even make it exist, given that we have
things like http_protocol.h?

Is the intent that everything in modules/http/http_* will now appear in
mod_core.h? [and I named that file wrong; it should be mod_http.h]

Second, I see that server/protocol.c was created and a ton of stuff pulled
from modules/http/http_protocol.c and shoved into protocol.c. However, most
of those functions *are* http-specific. So why'd they get moved? If the
intent was to keep http-specific stuff in modules/http, then what's up?

>...
>   1.1                  httpd-2.0/server/protocol.c
>   
>   Index: protocol.c
>...
>   const char *ap_make_content_type(request_rec *r, const char *type)

Content-Type is HTTP-specific.

>...
>   static int parse_byterange(char *range, apr_off_t clength,
>                              apr_off_t *start, apr_off_t *end)
>...

All the byterange stuff is HTTP-specific.

>...
>   AP_DECLARE(void) ap_set_content_length(request_rec *r, apr_off_t clength)
>...
>   AP_DECLARE(char *) ap_make_etag(request_rec *r, int force_weak)
>...
>   AP_DECLARE(void) ap_set_etag(request_rec *r)

HTTP-specific.

>...
>   AP_CORE_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold)

HTTP-specific. This understands the HTTP header/body mechanism.

>...
>   AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri)
>...
>   static int read_request_line(request_rec *r)
>...
>   static void get_mime_headers(request_rec *r)

HTTP-specific.

>...
>   request_rec *ap_read_request(conn_rec *conn)

Tough one. This is HTTP specific today, so I'd probably say leave it in
modules/http and create a new, generic request builder in server/protocol.c.

>...
>   void ap_set_sub_req_protocol(request_rec *rnew, const request_rec *r)

Urf. Probably HTTP specific, too.

>...
>   AP_DECLARE(void) ap_note_auth_failure(request_rec *r)
>...
>   AP_DECLARE(void) ap_note_basic_auth_failure(request_rec *r)
>...
>   AP_DECLARE(void) ap_note_digest_auth_failure(request_rec *r)
>...
>   AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)

All HTTP specific.

>...
>   AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *f,
>                                                                 apr_bucket_brigade 
>*b)
>...
>   static int ap_set_byterange(request_rec *r)

HTTP specific again.



I'm obviously really confused. What is your plan? Are all these HTTP
functions there only temporarily? I just don't understand...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Reply via email to