List Info

Thread: Re: svn commit: r571209 - /httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c




Re: svn commit: r571209 - /httpd/httpd/branches/2.2.x/modules/prox y/ajp_header.c
country flaguser name
United States
2007-08-30 10:36:18
Are these really candidates for bypassing the
normal backport process from trunk??

martinapache.org wrote:
> 
> Author: martin
> Date: Thu Aug 30 08:29:27 2007
> New Revision: 571209
> 
> URL: 
http://svn.apache.org/viewvc?rev=571209&view=rev
> Log:
> Convert just the message text to EBCDIC, and not the
(already EBCDIC) status code
> 
> Modified:
>    
httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c
> 
> Modified:
httpd/httpd/branches/2.2.x/modules/proxy/ajp_header.c
> URL: http://svn.apache.org/viewvc/httpd/ht
tpd/branches/2.2.x/modules/proxy/ajp_header.c?rev=571209&
;r1=571208&r2=571209&view=diff
>
============================================================
==================
> ---
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;
>      }
> 
> 


-- 
============================================================
===============
   Jim Jagielski   [|]   jimjaguNET.com   [|]   http://www.jaguNET.com/
	    "If you can dodge a wrench, you can dodge a
ball."

Re: svn commit: r571209 - /httpd/httpd/branches/2.2.x/modules/prox y/ajp_header.c
user name
2007-08-30 10:54:23
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
-- 
<Martin.KraemerFujitsu-Siemens.com>        |    
Fujitsu Siemens
http://ww
w.fujitsu-siemens.com/imprint.html | 81730  Munich, 
Germany

Re: svn commit: r571209 - /httpd/httpd/branches/2.2.x/modules/prox y/ajp_header.c
user name
2007-08-30 10:56:02
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??

I committed the other change (memcmp->strcmp) righty now
on trunk.
And yes, I am aware that I should have done that first,
sorry.

  Martin
-- 
<Martin.KraemerFujitsu-Siemens.com>        |    
Fujitsu Siemens
http://ww
w.fujitsu-siemens.com/imprint.html | 81730  Munich, 
Germany

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )