cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 InternalAprOutputBuffer.java Http11AprProcessor.java

2005-08-04 Thread remm
remm2005/08/04 00:07:57

  Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java
   http11/src/java/org/apache/coyote/http11
InternalAprOutputBuffer.java
Http11AprProcessor.java
  Log:
  - Remove useless HTTP/1.1 PAs (which seem to be only there for initial
access to the util package).
  - Fix AJP APR when security is enabled (access to the util package was 
failing).
  
  Revision  ChangesPath
  1.17  +7 -4  
jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java
  
  Index: AjpAprProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/coyote/ajp/AjpAprProcessor.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- AjpAprProcessor.java  30 Jul 2005 22:22:57 -  1.16
  +++ AjpAprProcessor.java  4 Aug 2005 07:07:57 -   1.17
  @@ -92,14 +92,17 @@
   readTimeout = 100 * 1000;
   }
   
  -// Cause loading of HexUtils
  -int foo = HexUtils.DEC[0];
  -
   // Allocate input and output buffers
   inputBuffer = ByteBuffer.allocateDirect(16 * 1024);
   inputBuffer.limit(0);
   outputBuffer = ByteBuffer.allocateDirect(16 * 1024);
   
  +// Cause loading of HexUtils
  +int foo = HexUtils.DEC[0];
  +
  +// Cause loading of HttpMessages
  +HttpMessages.getMessage(200);
  +
   }
   
   
  @@ -886,7 +889,7 @@
   responseHeaderMessage.appendInt(response.getStatus());
   String message = response.getMessage();
   if (message == null){
  -message= HttpMessages.getMessage(response.getStatus());
  +message = HttpMessages.getMessage(response.getStatus());
   } else {
   message = message.replace('\n', ' ').replace('\r', ' ');
   }
  
  
  
  1.5   +6 -30 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
  
  Index: InternalAprOutputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalAprOutputBuffer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InternalAprOutputBuffer.java  18 May 2005 09:25:08 -  1.4
  +++ InternalAprOutputBuffer.java  4 Aug 2005 07:07:57 -   1.5
  @@ -18,8 +18,6 @@
   
   import java.io.IOException;
   import java.nio.ByteBuffer;
  -import java.security.AccessController;
  -import java.security.PrivilegedAction;
   
   import org.apache.tomcat.jni.Socket;
   import org.apache.tomcat.util.buf.ByteChunk;
  @@ -78,6 +76,9 @@
   committed = false;
   finished = false;
   
  +// Cause loading of HttpMessages
  +HttpMessages.getMessage(200);
  +
   }
   
   
  @@ -428,42 +429,17 @@
   // Write message
   String message = response.getMessage();
   if (message == null) {
  -write(getMessage(status));
  +write(HttpMessages.getMessage(status));
   } else {
   write(message);
   }
   
   // End the response status line
  -if (System.getSecurityManager() != null){
  -   AccessController.doPrivileged(
  -new PrivilegedAction(){
  -public Object run(){
  -buf[pos++] = Constants.CR;
  -buf[pos++] = Constants.LF;
  -return null;
  -}
  -}
  -   );
  -} else {
  -buf[pos++] = Constants.CR;
  -buf[pos++] = Constants.LF;
  -}
  +buf[pos++] = Constants.CR;
  +buf[pos++] = Constants.LF;
   
   }
   
  -private String getMessage(final int message){
  -if (System.getSecurityManager() != null){
  -   return (String)AccessController.doPrivileged(
  -new PrivilegedAction(){
  -public Object run(){
  -return HttpMessages.getMessage(message); 
  -}
  -}
  -   );
  -} else {
  -return HttpMessages.getMessage(message);
  -}
  -}
   
   /**
* Send a header.
  
  
  
  1.31  +4 -15 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java
  
  Index: Http11AprProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11AprProcessor.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Http11AprProcessor.java   31 Jul 2005 09:23:02 -  1.30
  +++ 

Re: cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 InternalAprOutputBuffer.java Http11AprProcessor.java

2005-08-04 Thread Bill Barker

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 04, 2005 12:07 AM
Subject: cvs commit:
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
InternalAprOutputBuffer.java Http11AprProcessor.java


 remm2005/08/04 00:07:57

   Modified:jk/java/org/apache/coyote/ajp AjpAprProcessor.java
http11/src/java/org/apache/coyote/http11
 InternalAprOutputBuffer.java
 Http11AprProcessor.java
   Log:
   - Remove useless HTTP/1.1 PAs (which seem to be only there for initial
 access to the util package).
   - Fix AJP APR when security is enabled (access to the util package was
failing).


It looks like you did the same thing I did with JK:  Remove the useless PAs,
and then don't bother to test on a clean build (so that SecurityClassLoad
can still find the removed classes and doesn't complain).  If you don't want
BZ 35894 re-opened, you also need to remove the reference to the removed PAs
in SecurityClassLoad ;-).



This message is intended only for the use of the person(s) listed above as the 
intended recipient(s), and may contain information that is PRIVILEGED and 
CONFIDENTIAL.  If you are not an intended recipient, you may not read, copy, or 
distribute this message or any attachment. If you received this communication 
in error, please notify us immediately by e-mail and then delete all copies of 
this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through 
the Internet is not secure. Do not send confidential or sensitive information, 
such as social security numbers, account numbers, personal identification 
numbers and passwords, to us via ordinary (unencrypted) e-mail.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 InternalAprOutputBuffer.java Http11AprProcessor.java

2005-08-04 Thread Remy Maucherat

Bill Barker wrote:

It looks like you did the same thing I did with JK:  Remove the useless PAs,
and then don't bother to test on a clean build (so that SecurityClassLoad
can still find the removed classes and doesn't complain).  If you don't want
BZ 35894 re-opened, you also need to remove the reference to the removed PAs
in SecurityClassLoad ;-).


I made the changes only to the APR versions, so it looks ok to me.

Rémy

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]