You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2007/08/30 17:36:18 UTC

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

Are these really candidates for bypassing the
normal backport process from trunk??

martin@apache.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/httpd/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   [|]   jim@jaguNET.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/proxy/ajp_header.c

Posted by Jim Jagielski <ji...@jagunet.com>.
On Aug 30, 2007, at 11:54 AM, Martin Kraemer wrote:

> 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:
>
> Later I had fixed it to eliminate the redundant tmp variable.
> Apparently, it was never backported.
>

But you just don't backport to the 2.2 branch. It's the
stable branch and it is RTC. Backports are proposed in
STATUS, voted on and then applied. None of that was done in
this case...


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

Posted by Jim Jagielski <ji...@jagunet.com>.
On Aug 30, 2007, at 11:54 AM, Martin Kraemer wrote:

> 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:
>
> Later I had fixed it to eliminate the redundant tmp variable.
> Apparently, it was never backported.
>

But you just don't backport to the 2.2 branch. It's the
stable branch and it is RTC. Backports are proposed in
STATUS, voted on and then applied. None of that was done in
this case...


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

Posted by Martin Kraemer <ma...@apache.org>.
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
-- 
<Ma...@Fujitsu-Siemens.com>        |     Fujitsu Siemens
http://www.fujitsu-siemens.com/imprint.html | 81730  Munich,  Germany

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

Posted by Jim Jagielski <ji...@jagunet.com>.
On Aug 30, 2007, at 11:56 AM, Martin Kraemer wrote:

> 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.
>

I'll wait for you to read my other Email... we seem
to be out of phase :)

Basically: you cannot patch 2.2 directly without proposing
patches in STATUS and having them voted on, since 2.2 is
the stable branch and is RTC.



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

Posted by Martin Kraemer <ma...@apache.org>.
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
-- 
<Ma...@Fujitsu-Siemens.com>        |     Fujitsu Siemens
http://www.fujitsu-siemens.com/imprint.html | 81730  Munich,  Germany

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

Posted by Martin Kraemer <ma...@apache.org>.
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
-- 
<Ma...@Fujitsu-Siemens.com>        |     Fujitsu Siemens
http://www.fujitsu-siemens.com/imprint.html | 81730  Munich,  Germany