httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@engelschall.com>
Subject Re: 2 more API thingies
Date Wed, 05 Aug 1998 06:13:20 GMT

In article <3.0.5.32.19980804150409.009622a0@pop.ma.ultranet.com> you wrote:

> Shouldn't the is_HTTP_*() macros have the ap_ prefix?

They should, because they are used also inside modules and
not only the core code:

:> aps grep is_HTTP
===> include/httpd.h
#define is_HTTP_INFO(x)         (((x) >= 100)&&((x) < 200))
#define is_HTTP_SUCCESS(x)      (((x) >= 200)&&((x) < 300))
#define is_HTTP_REDIRECT(x)     (((x) >= 300)&&((x) < 400))
#define is_HTTP_ERROR(x)        (((x) >= 400)&&((x) < 600))
#define is_HTTP_CLIENT_ERROR(x) (((x) >= 400)&&((x) < 500))
#define is_HTTP_SERVER_ERROR(x) (((x) >= 500)&&((x) < 600))
===> main/http_protocol.c
    if (!is_HTTP_SUCCESS(r->status) || r->no_local_copy) {
    if (is_HTTP_SUCCESS(status)) {
            && (is_HTTP_REDIRECT(status) || status == HTTP_CREATED))
===> modules/proxy/mod_proxy.c
        if (is_HTTP_REDIRECT(rc))
===> modules/proxy/mod_proxy.h
                       const int is_HTTP1, int nocache);
===> modules/proxy/proxy_cache.c
                       const int is_HTTP1, int nocache)
        (r->status == 200 && lmods == NULL && is_HTTP1) ||
===> modules/standard/mod_alias.c
    if (is_HTTP_REDIRECT(status)) {
        if (is_HTTP_REDIRECT(status)) {
        if (is_HTTP_REDIRECT(status))
===> modules/standard/mod_asis.c
        ((r->status == HTTP_OK) || is_HTTP_REDIRECT(r->status))) {
===> modules/standard/mod_dir.c
        if (is_HTTP_REDIRECT(rr->status) ||
===> modules/standard/mod_expires.c
    if (is_HTTP_ERROR(r->status))       /* Don't add Expires headers to errors
*/
===> modules/standard/mod_include.c
    if (is_HTTP_REDIRECT(rr_status)) {
===> modules/standard/mod_rewrite.c
            if (!is_HTTP_REDIRECT(status)) {
            if (is_HTTP_REDIRECT(r->status)) {
            if (is_HTTP_REDIRECT(r->status)) {

Feel free to rename them to ap_is_xxxx!

> Can we API_EXPORT scan_script_header_err_core()?
> At the moment, I have some 1.2.x copy-n-pasted code to scan headers from a
> string in mod_perl, that could be rid of if we could see
> scan_script_header_err_core().

Sounds reasonable to me, too. But only if at the same time you rename it to
ap_xxx, of course. Just adding API_EXPORT is not ok.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message