www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Gailliez <vincent.gaill...@systemat.lu>
Subject general/3576: Always message "Expected </xxx> but saw </xxx>" when starting Apache.
Date Tue, 22 Dec 1998 16:15:51 GMT

>Number:         3576
>Category:       general
>Synopsis:       Always message "Expected </xxx> but saw </xxx>" when starting
Apache.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Dec 22 08:20:01 PST 1998
>Last-Modified:
>Originator:     vincent.gailliez@systemat.lu
>Organization:
apache
>Release:        1.3.2 and 1.3.3
>Environment:
OS       : AIX 4.3.2
Compiler : C Compiler 4.4c
Uname -a : AIX bilbo 3 4 001100044C00
>Description:
I have always the message "Expected </xxx> but saw </xxx>" (where xxx is 
Directory, File, VirtualHost, ... in httpd.conf, access.conf, srm.conf) when
starting Apache (apachectl start).

The problem come from src/main/httpd_core.c when Apache compare 2 strings in
the function end_nested_section() with the operator != to compare the 2 string
pointers. When I replace this comparison with a string comparison strcmp(),
it's work.

(Sorry for my english)


    if (cmd->cmd->name != cmd->end_token) {
        return ap_pstrcat(cmd->pool, "Expected ", cmd->end_token, " but saw ",
                          cmd->cmd->name, NULL);
    }

==========>>>>>>>>>>>>

    if (strcmp(cmd->cmd->name,cmd->end_token)) {
        return ap_pstrcat(cmd->pool, "Expected ", cmd->end_token, " but saw ",
                          cmd->cmd->name, NULL);
    }
>How-To-Repeat:
Yes, see the source of http_core.c
>Fix:
Replace the comparison != with a string compare strcmp() in the function
end_nested_section() (in http_core.c).
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]




Mime
View raw message