Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2005-03-25 Thread Remy Maucherat
[EMAIL PROTECTED] wrote:
billbarker2005/03/24 19:53:25
  Modified:util/java/org/apache/tomcat/util/http MimeHeaders.java
  Log:
  Make setValue guarantee that the header is unique (that's how it's being used anyway).
  
  Fix for Bug #34113

  - MessageBytes value=getValue(name);
  - if( value == null ) {
  - MimeHeaderField mh = createHeader();
  - mh.getName().setString(name);
  - value=mh.getValue();
  - }
  - return value;
  +for ( int i = 0; i  count; i++ ) {
  +if(headers[i].getName().equalsIgnoreCase(name)) {
  +for ( int j=i+1; j  count; j++ ) {
  +if(headers[j].getName().equalsIgnoreCase(name)) {
  +removeHeader(j--);
  +}
  +}
  +return headers[i].getValue();
  +}
  +}
  +MimeHeaderField mh = createHeader();
  +mh.getName().setString(name);
  +return mh.getValue();
This should be more efficient as I don't like what removeHeader does. 
Since it only happens when actually having a multi valued header, it is 
not that critical, however.

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


RE: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2002-03-12 Thread Larry Isaacs

I prefer not to move tomcat_util to J-T-C until after Tomcat 3.3.1,
which I plan on getting out this week or weekend at the latest.
After that, I'm +1.

Cheers,
Larry

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, March 11, 2002 7:10 PM
 To: Tomcat Developers List
 Subject: Re: cvs commit: 
 jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/htt
 p MimeHeaders.java
 
 
  On Mon, 11 Mar 2002, Bill Barker wrote:
 
   Now if we could just make the code common to 3.3/4.0. :(
   I think that we'll probably have to review the tomcat_util.jar 
   policies
 in
   3.3.2 now that more people are likely to start using modules from 
   j-t-c.
 
  What about removing the tomcat_util from 3.3 tree, and keeping a 
  single copy in j-t-c ?
 
  As long as tomcat_util.jar is backward compatibile it is 
 possible to 
  use new modules with any 3.3.x - by upgrading the jar with 
 the newer 
  version.
 
  Larry - would you be comfortable with this ? It's much easier than 
  duplicating each change in 2 trees ( especially since Remy may be 
  uncomfortable updating the changes in 3.3 tree :-).
 
 I didn't know I was supposed to keep them in sync ;-)
 
 I noticed it was a very bad idea to keep duplicated sources, 
 so +1 for removing the duplication.
 
 Remy
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 

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




RE: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2002-03-12 Thread GOMEZ Henri

 I prefer not to move tomcat_util to J-T-C until after Tomcat 3.3.1,
 which I plan on getting out this week or weekend at the latest.
 After that, I'm +1.

Agree


What about including the alpha of coyote and jk2(java) with 3.3.1 ? 
( disabled, but easy to activate )

+1, disabled by default but activable. It will help us all to have
bug reports from coyote when activated in TC 3.3.1

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




RE: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2002-03-11 Thread GOMEZ Henri

Excellent, another piece of code common to 3.3/4.0 ;)

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .) 
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 



-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 10, 2002 7:36 AM
To: Tomcat Developers List
Subject: Re: cvs commit:
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http
MimeHeaders.java


You really like making work for me, don't you? ;-)

I'll port this to 3.3 branch unless somebody objects.  Adding 
a method that
isn't currently called by 3.3 doesn't hurt anything, and 
o.a.t.* classes
should (need to) be the same in j-t-c and 3.3 for now.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 09, 2002 10:54 AM
Subject: cvs commit:
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http
MimeHeaders.java


 remm02/03/09 10:54:28

   Modified:util/java/org/apache/tomcat/util/http MimeHeaders.java
   Log:
   - Add a method allowing to create a header using a char buffer.

   Revision  ChangesPath
   1.3   +9 -0
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http
/MimeHeaders.
java

   Index: MimeHeaders.java
   ===
   RCS file:
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat
/util/http/Mi
meHeaders.java,v
   retrieving revision 1.2
   retrieving revision 1.3
   diff -u -r1.2 -r1.3
   --- MimeHeaders.java 31 Dec 2001 18:20:05 - 1.2
   +++ MimeHeaders.java 9 Mar 2002 18:54:28 - 1.3
   @@ -288,6 +288,15 @@
return mhf.getValue();
}

   +/** Create a new named header using translated char[].
   + */
   +public MessageBytes addValue(char c[], int startN, int endN)
   +{
   + MimeHeaderField mhf=createHeader();
   + mhf.getName().setChars(c, startN, endN);
   + return mhf.getValue();
   +}
   +
/** Allow set operations -
return a MessageBytes container for the
header value ( existing header or new




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



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


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




Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2002-03-11 Thread Bill Barker

Now if we could just make the code common to 3.3/4.0. :(
I think that we'll probably have to review the tomcat_util.jar policies in
3.3.2 now that more people are likely to start using modules from j-t-c.
- Original Message -
From: GOMEZ Henri [EMAIL PROTECTED]
To: Tomcat Developers List [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 4:21 AM
Subject: RE: cvs commit:
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http
MimeHeaders.java


Excellent, another piece of code common to 3.3/4.0 ;)

-
Henri Gomez ___[_]
EMAIL : [EMAIL PROTECTED](. .)
PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6



-Original Message-
From: Bill Barker [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 10, 2002 7:36 AM
To: Tomcat Developers List
Subject: Re: cvs commit:
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http
MimeHeaders.java


You really like making work for me, don't you? ;-)

I'll port this to 3.3 branch unless somebody objects.  Adding
a method that
isn't currently called by 3.3 doesn't hurt anything, and
o.a.t.* classes
should (need to) be the same in j-t-c and 3.3 for now.
- Original Message -




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




Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2002-03-11 Thread Remy Maucherat

 On Mon, 11 Mar 2002, Bill Barker wrote:

  Now if we could just make the code common to 3.3/4.0. :(
  I think that we'll probably have to review the tomcat_util.jar policies
in
  3.3.2 now that more people are likely to start using modules from j-t-c.

 What about removing the tomcat_util from 3.3 tree, and keeping a single
 copy in j-t-c ?

 As long as tomcat_util.jar is backward compatibile it is possible to
 use new modules with any 3.3.x - by upgrading the jar with the newer
 version.

 Larry - would you be comfortable with this ? It's much easier than
 duplicating each change in 2 trees ( especially since Remy may be
 uncomfortable updating the changes in 3.3 tree :-).

I didn't know I was supposed to keep them in sync ;-)

I noticed it was a very bad idea to keep duplicated sources, so +1 for
removing the duplication.

Remy


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




Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2002-03-09 Thread Bill Barker

You really like making work for me, don't you? ;-)

I'll port this to 3.3 branch unless somebody objects.  Adding a method that
isn't currently called by 3.3 doesn't hurt anything, and o.a.t.* classes
should (need to) be the same in j-t-c and 3.3 for now.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 09, 2002 10:54 AM
Subject: cvs commit:
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http
MimeHeaders.java


 remm02/03/09 10:54:28

   Modified:util/java/org/apache/tomcat/util/http MimeHeaders.java
   Log:
   - Add a method allowing to create a header using a char buffer.

   Revision  ChangesPath
   1.3   +9 -0
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/MimeHeaders.
java

   Index: MimeHeaders.java
   ===
   RCS file:
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/Mi
meHeaders.java,v
   retrieving revision 1.2
   retrieving revision 1.3
   diff -u -r1.2 -r1.3
   --- MimeHeaders.java 31 Dec 2001 18:20:05 - 1.2
   +++ MimeHeaders.java 9 Mar 2002 18:54:28 - 1.3
   @@ -288,6 +288,15 @@
return mhf.getValue();
}

   +/** Create a new named header using translated char[].
   + */
   +public MessageBytes addValue(char c[], int startN, int endN)
   +{
   + MimeHeaderField mhf=createHeader();
   + mhf.getName().setChars(c, startN, endN);
   + return mhf.getValue();
   +}
   +
/** Allow set operations -
return a MessageBytes container for the
header value ( existing header or new




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



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