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=29098>. 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=29098 Problem with HTTP status header being truncated Summary: Problem with HTTP status header being truncated Product: Apache httpd-2.0 Version: 2.0.49 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: mod_isapi AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] I have an ISAPI extension that I'm testing with Apache. When logging the HTTP traffic I noticed that my HTTP status headers were being truncated. Ex: HTTP/1.1 200 O instead of HTTP/1.1 200 OK HTTP/1.1 302 Obje instead of HTTP/1.1 302 Object Moved HTTP/1.1 401 Acce instead of HTTP/1.1 401 Access Denied I dug through the code and found a couple of problems with send_response_header in mod_isapi.c. On line line 679 I made the following change: statlen = toklen; // Instead of statlen -= tokenlen; That left me with all of my headers truncated by one character. After taking a look at line 685 I noticed a call was made to apr_cpystrn which assumes a null terminated string. The call on 685 uses statlen and stat isn't null terminated. So, changing it to apr_cpystrn(newstat + 8, stat, statlen + 1); // Instead of apr_cpystrn(newstat + 8, stat, statlen); Fixes the second problem. All my status headers come through correctly with both changes in place. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
