You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2002/11/09 16:34:27 UTC

DO NOT REPLY [Bug 14410] New: - HSE_REQ_SEND_RESPONSE_HEADER always returns Internal Server Error

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

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14410

HSE_REQ_SEND_RESPONSE_HEADER always returns Internal Server Error

           Summary: HSE_REQ_SEND_RESPONSE_HEADER always returns Internal
                    Server Error
           Product: Apache httpd-2.0
           Version: HEAD
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: mod_isapi
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: detlev.vendt@brillit.de


Following the calls thru mod_isapi.c for HSE_REQ_SEND_RESPONSE_HEADER shows, 
that the call to ap_scan_script_header_err_strs() (what itself calls 
ap_scan_script_header_err_core) will _always_ cause that cid->r->status gets 
the value of 500. The resulting output give 'OK' with an additional Internal 
server error message'

The reason for that is the last parameter given to 
ap_scan_script_header_err_strs() as NULL. ap_scan_script_header_err_core() 
checks all the parameters for zero and returns an internal server error (with 
log 'Premature end of script headers' if one is NULL.

Inserting a 'fake' parameter "\r\n" will cause a normal behaviour w/o 
generating err 500. Please refer to the code snippet below.

    /* Seems IIS does not enforce the requirement for \r\n termination 
     * on HSE_REQ_SEND_RESPONSE_HEADER, but we won't panic... 
     * ap_scan_script_header_err_strs handles this aspect for us.
     *
     * Parse them out, or die trying 
     */
    if (stat) {
        cid->r->status = ap_scan_script_header_err_strs(cid->r, NULL, 
            &termch, &termarg, stat, head, "\r\n", NULL);
        cid->ecb->dwHttpStatusCode = cid->r->status;
    }
    else {
        cid->r->status = ap_scan_script_header_err_strs(cid->r, NULL, 
            &termch, &termarg, head, "\r\n", NULL);

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org