On Thu, Aug 30, 2007 at 11:36:18AM -0400, Jim Jagielski wrote:
> Are these really candidates for bypassing the
> normal backport process from trunk??
>
> > --- httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c (original)
> > +++ httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c Thu Aug 30
> > 08:29:27 2007
> > @@ -473,10 +473,11 @@
> >
> > rc = ajp_msg_get_string(msg, &ptr);
> > if (rc == APR_SUCCESS) {
> > - r->status_line = apr_psprintf(r->pool, "%d %s", status, ptr);
> > -#if defined(AS400) || defined(_OSD_POSIX)
> > - ap_xlate_proto_from_ascii(r->status_line, strlen(r->status_line));
> > +#if defined(AS400) || defined(_OSD_POSIX) /* EBCDIC platforms */
> > + ptr = apr_pstrdup(r->pool, ptr);
> > + ap_xlate_proto_from_ascii(ptr, strlen(ptr));
> > #endif
> > + r->status_line = apr_psprintf(r->pool, "%d %s", status, ptr);
> > } else {
> > r->status_line = NULL;
This patch is already in trunk:
104711 jfclere rc = ajp_msg_get_string(msg, &ptr);
104711 jfclere if (rc == APR_SUCCESS) {
409709 trawick #if APR_CHARSET_EBCDIC /* copy only if we have to */
357699 martin ptr = apr_pstrdup(r->pool, ptr);
357699 martin ap_xlate_proto_from_ascii(ptr, strlen(ptr));
104711 jfclere #endif
357022 jfclere r->status_line = apr_psprintf(r->pool, "%d %s",
status, ptr);
It was committed by jfclere in rev. 357022:
------------------------------------------------------------------------
r357022 | jfclere | 2005-12-15 15:44:39 +0100 (Do, 15 Dez 2005) | 2 lines
The string comming from TC is in ASCII and the string returned by apr_psprintf
isn't.
------------------------------------------------------------------------
svn diff -r357021:357022 modules/proxy/ajp_header.c
Index: modules/proxy/ajp_header.c
===================================================================
--- modules/proxy/ajp_header.c (Revision 357021)
+++ modules/proxy/ajp_header.c (Revision 357022)
@@ -473,10 +473,12 @@
rc = ajp_msg_get_string(msg, &ptr);
if (rc == APR_SUCCESS) {
- r->status_line = apr_psprintf(r->pool, "%d %s", status, ptr);
#if defined(AS400) || defined(_OSD_POSIX)
- ap_xlate_proto_from_ascii(r->status_line, strlen(r->status_line));
+ char *tmp = ap_pstrdup(r->pool, ptr);
+ ap_xlate_proto_from_ascii(tmp, strlen(tmp));
+ ptr = tmp
#endif
+ r->status_line = apr_psprintf(r->pool, "%d %s", status, ptr);
} else {
r->status_line = NULL;
}
Later I had fixed it to eliminate the redundant tmp variable.
Apparently, it was never backported.
Martin
--
<[EMAIL PROTECTED]> | Fujitsu Siemens
http://www.fujitsu-siemens.com/imprint.html | 81730 Munich, Germany