DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40628>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40628

           Summary: mod_isapi always returns status 500. Bug is in core
                    (libhttpd)
           Product: Apache httpd-2
           Version: 2.2.2
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Keywords: ErrorMessage, PatchAvailable
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Every ISAPI returns status 500 "internal server error" and it returns the 
desired content. No real error has occurred.

I could trace it back to: (Source taken from httpd-2.2.3 win32 version)

mod_apache.c line 713: function apr_ssize_t send_response_header

Cid->r->status = ap_scan_script_header_err_strs(cid->r, NULL,
                                   &termch, &termarg, stat, head, NULL);
cid->ecb->dwHttpStatusCode = cid->r->status;

Termarg = 2
Stat = "Status: 200 OK"
Head    = "Content-Type: text/html\r\nContent-Length: 22\r\n\r\n"

Retun value is 0. Should be 200.



util_script.c line 714: function ap_scan_script_header_err_strs

res = ap_scan_script_header_err_core(r, buffer, getsfunc_STRING, 
                                                           (void *) &strs);

Return value is 0. Should be 200.



After successfull execution of function ap_scan_script_header_err_core
util_script.c line 599: function ap_scan_script_header_err_core

return OK;


OK is defined in httpd.h
httpd.h line 445:

#define OK 0                    /**< Module has handled this stage. */

HTTP_OK is defined in httpd.h
httpd.h line 462:

#define HTTP_OK                            200


Solution:
The return OK; in util_script.c line 599 should be replaced with return HTTP_OK;
The other possible return in ap_scan_script_header_err_core is 
HTTP_INTERNAL_SERVER_ERROR which is the value 500. (that shows HTTP_ results 
are required in the function.)

Because the return value is 0 mod_apache reads the client content. Later return 
value 0 is recognized as invalid and it reports an internal server error.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to