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/09/25 02:23:49 UTC
DO NOT REPLY [Bug 12981] New: -
Apache Bench can't take binary post data
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=12981>.
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=12981
Apache Bench can't take binary post data
Summary: Apache Bench can't take binary post data
Product: Apache httpd-2.0
Version: HEAD
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: support
AssignedTo: bugs@httpd.apache.org
ReportedBy: mgerlach@lightsurf.com
In version 2.0.42, ApacheBench cannot handle non-ascii text in the post data.
This is due to the use of strcpy() when memcpy() should have been used. Below
is the output of diff -c on my fix to the problem:
mg-lin:~/free_source/httpd-2.0.42/support % diff -c ab.c ab.c.orig
*** ab.c Tue Sep 24 17:11:51 2002
--- ab.c.orig Tue Sep 24 16:59:19 2002
***************
*** 1629,1635 ****
if (posting == 1) {
char *buff = (char *) malloc(postlen + reqlen + 1);
strcpy(buff, request);
! memcpy(buff + reqlen, postdata, postlen);
request = buff;
}
--- 1629,1635 ----
if (posting == 1) {
char *buff = (char *) malloc(postlen + reqlen + 1);
strcpy(buff, request);
! strcpy(buff + reqlen, postdata);
request = buff;
}
***************
*** 1939,1945 ****
return APR_EINVAL;
}
apr_file_close(postfd);
- printf("successfully read %d bytes of file, %s\n", length, pfile);
return 0;
}
--- 1939,1944 ----
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org