Re: Strangest thing I've ever seen: Manager doesn't like its allow clause.

"James H. H. Lampert" <[email protected]>
Newsgroups gmane.comp.jakarta.tomcat.user
Message-ID <[email protected]>
On 11/14/25 9:55 AM, Christopher Schultz wrote:
> So what's up?

What's up is that I copied the RegExp from the RemoteAddrValve in 110 
(or earlier) into the RemoteCIDRValve in 111, the way I'd done many 
times before when updating releases, without noticing the difference in 
className this time.

I'm guessing, based on my understanding of the development list thread 
to which I was referred, that if I had simply copied the manager 
context's entire META-INF/context.xml, one of two things would have 
happened: either (a) it would have worked just fine, with nothing more 
than a log message about RemoteAddrValve being deprecated (that would 
have probably gone unnoticed until some future release when 
RemoteAddrValve is removed completely), or (b) it would have rejected 
the entire META-INF/context.xml, and I'd have then done exactly what I'd 
actually done, and I'd have had two cases of manager mysteriously 
refusing to come up, instead of just one.

I think that if I'd been the one updating the META-INF/context.xml in 
the distro, I'd have added a comment, in all caps, right before the 
<VALVE ... />, to the effect of:
<!-- NOTE THE CHANGE IN BOTH THE VALVE CLASS AND THE FORMAT OF THE 
"ALLOW" CLAUSE! THE NEW CLASS EXPECTS COMMA-DELIMITED CIDR, RATHER THAN 
FENCEPOST-DELIMITED REGULAR EXPRESSIONS! -->

Not that such a comment would necessarily have stopped me from doing 
what I did wrong, but it would have denied me an excuse for my mistake, 
and probably allowed me to recognize and correct it without having to 
ask for help.

--
JHHL
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.