tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/native/apache/jserv jserv_status.c jserv_ajpv12.c jserv_ajpv11.c
Date Tue, 04 Apr 2000 19:58:20 GMT
jluc        00/04/04 12:58:20

  Modified:    src/native/apache/jserv jserv_status.c jserv_ajpv12.c
                        jserv_ajpv11.c
  Log:
  keep sync with JServ.
  EBCDIC patches.
  Submitted by  jfrederic.clere@fujitsu.siemens.es
  
  Revision  Changes    Path
  1.3       +5 -1      jakarta-tomcat/src/native/apache/jserv/jserv_status.c
  
  Index: jserv_status.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/apache/jserv/jserv_status.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jserv_status.c	2000/04/04 19:46:43	1.2
  +++ jserv_status.c	2000/04/04 19:58:19	1.3
  @@ -58,7 +58,7 @@
    * Based on:    mod_jserv.c by Alexei Kosut <akosut@apache.org>              *
    *              mod_example.c by Apache Group <apache@apache.org>            *
    * Modified by: Pierpaolo Fumagalli <ianosh@iname.com> June, 12 1998         *
  - * Version:     $Revision: 1.2 $                                             *
  + * Version:     $Revision: 1.3 $                                             *
    *****************************************************************************/
   #include "jserv.h"
   
  @@ -724,6 +724,10 @@
   static int jserv_status_out_image(jserv_config *cfg, jserv_request *req,
                                      request_rec *r) {
       r->content_type = "image/gif";
  +#ifdef CHARSET_EBCDIC
  +    /* For EBCDIC, set the auto-conversion flag now that the MIME type is set */
  +    ap_checkconv(r);
  +#endif /*CHARSET_EBCDIC*/
       ap_set_content_length(r,jserv_image_size);
       ap_send_http_header(r);
       if (r->header_only) return OK;
  
  
  
  1.7       +32 -6     jakarta-tomcat/src/native/apache/jserv/jserv_ajpv12.c
  
  Index: jserv_ajpv12.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/apache/jserv/jserv_ajpv12.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- jserv_ajpv12.c	2000/03/30 09:26:57	1.6
  +++ jserv_ajpv12.c	2000/04/04 19:58:19	1.7
  @@ -57,7 +57,7 @@
    * Description: ajpv1.2 protocol, used to call local or remote jserv hosts   *
    * Author:      Pierpaolo Fumagalli <ianosh@iname.com>                       *
    * Author:      Michal Mosiewicz <mimo@interdata.pl>                         *
  - * Version:     $Revision: 1.6 $                                             *
  + * Version:     $Revision: 1.7 $                                             *
    *****************************************************************************/
   #include "jserv.h"
   
  @@ -195,19 +195,37 @@
   static int ajpv12_sendnbytes(BUFF * bsock, const void *buffer, int bufferlen ) {
       unsigned char bytes[2];
       static char null_b[2];
  +    int ret;
  +#ifdef CHARSET_EBCDIC
  +    int flags;
  +#endif
  +
       null_b[0] = 0xff;
       null_b[1] = 0xff;
  +#ifdef CHARSET_EBCDIC
  +    flags = bsock->flags;
  +    bsock->flags = bsock->flags & ~B_EBCDIC2ASCII; /* binary */
  +#endif
  +
       if( buffer != NULL ) {
   	bytes[0] = (unsigned char) ( (bufferlen >> 8) & 0xff );
   	bytes[1] = (unsigned char) ( bufferlen & 0xff );
   
  -	if (ap_bwrite(bsock, bytes, 2) == 2) {
  +	ret = ap_bwrite(bsock, bytes, 2);
  +#ifdef CHARSET_EBCDIC
  +	bsock->flags = flags;
  +#endif
  +	if (ret == 2) {
   	    return ap_bwrite(bsock,buffer,bufferlen);
   	} else {
   	    return 0;
   	}
       } else {
  -	return ap_bwrite(bsock,null_b,2) == 2 ? 0 : -1;
  +	ret = ap_bwrite(bsock,null_b,2);
  +#ifdef CHARSET_EBCDIC
  +	bsock->flags = flags;
  +#endif
  +	return ret == 2 ? 0 : -1;
       }
   }
   
  @@ -224,9 +242,20 @@
   }
   
   static int ajpv12_mark(BUFF * bsock, unsigned char type) {
  +#ifdef CHARSET_EBCDIC
  +    int flags;
  +    flags = bsock->flags;
  +    bsock->flags = bsock->flags & ~B_EBCDIC2ASCII; /* binary */
  +#endif
       if( ap_bwrite(bsock, &type, 1) == 1) {
  +#ifdef CHARSET_EBCDIC
  +        bsock->flags = flags;
  +#endif
   	return 0;
       } else {
  +#ifdef CHARSET_EBCDIC
  +        bsock->flags = flags;
  +#endif
   	return -1;
       }
   }
  @@ -505,9 +534,6 @@
   	 * Need to re-escape it for this, since the entire URI was
   	 * un-escaped before we determined where the PATH_INFO began.
   	 */
  -        /* XXX In 2.2 we need to add "contextPath" or zone to the path_info !!!!!
  -         */
  -
   	request_rec *pa_req;
   
   	pa_req = ap_sub_req_lookup_uri(ap_escape_uri(r->pool, r->path_info), r);
  
  
  
  1.2       +12 -1     jakarta-tomcat/src/native/apache/jserv/jserv_ajpv11.c
  
  Index: jserv_ajpv11.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/apache/jserv/jserv_ajpv11.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jserv_ajpv11.c	1999/11/25 01:29:55	1.1
  +++ jserv_ajpv11.c	2000/04/04 19:58:19	1.2
  @@ -56,9 +56,12 @@
   /*****************************************************************************
    * Description: ajpv1.1 protocol, used to call local or remote jserv hosts   *
    * Author:      Pierpaolo Fumagalli <ianosh@iname.com>                       *
  - * Version:     $Revision: 1.1 $                                            *
  + * Version:     $Revision: 1.2 $                                             *
    *****************************************************************************/
   #include "jserv.h"
  +#ifdef CHARSET_EBCDIC
  +#include "ebcdic.h"
  +#endif
   
   /*****************************************************************************
    * Code for ajpv11 protocol                                                   *
  @@ -130,7 +133,11 @@
   
       /* Handle our end properly */
       if (type=='\0') {
  +#ifndef CHARSET_EBCDIC
           i=send(sock,"0000",4,0);
  +#else
  +	i=send(sock,"\x30\x30\x30\x30",4,0);
  +#endif
           if (i==4) return 0;
           else return 0;
       }
  @@ -149,6 +156,10 @@
   
       /* Send data to peer */
       bufferlen=strlen(buffer);
  +#ifdef CHARSET_EBCDIC
  +    ebcdic2ascii(buffer,buffer,bufferlen);
  +#endif
  +
       i=send(sock,buffer,bufferlen,0);
       if (i!=bufferlen) return -1;
       return 0;
  
  
  

Mime
View raw message