Bug 62140 implementation question
Hi there, I'd like to resolve Bug 62140 [0]. I just wanted to gather some opinions about the implementation details. In my mind, the following solution is quite reasonable: 1. Create new help scripts, such as help.sh and help.bat. These files contain a method for each functional verb that prints some info about the verb and exits with 0. 2. Source the files in both catalina.sh and catalina.bat 3. When user enters catalina.[sh|bat] $verb help (or -h, --help?), execute one of the methods. In my mind, the above solution is quite straightforward. Any gotchas, or obvious problems? [0] https://bz.apache.org/bugzilla/show_bug.cgi?id=62140 Cheers, -- Marek Czernek JWS/JBCS Associate Quality Engineer, RHCA Find me at www.halfastack.com
Re: Bug 62140 implementation question
Well, I personally would prefer if it was a soure-able (or call-able for windows) script; otherwise, you'd have to parse the text file to check which part of the text you want to output, since you don't want to output all the text at once, but only for one particular verb. Any particular benefits for a text file over two scripts? It's true it's single-sourced, but given that all scripts are essentially duplicated into .sh and .bat, I don't feel like that outweighs the ease of use and extensibility of the help script files. On 10/2/18 4:45 PM, Mitch Claborn wrote: Are the available verbs the same for both .sh and .bat? If so, perhaps a text file that contains the actual help text that could be output from both .bat and .sh. Mitch On 10/01/2018 02:48 PM, Marek Czernek wrote: Hi there, I'd like to resolve Bug 62140 [0]. I just wanted to gather some opinions about the implementation details. In my mind, the following solution is quite reasonable: 1. Create new help scripts, such as help.sh and help.bat. These files contain a method for each functional verb that prints some info about the verb and exits with 0. 2. Source the files in both catalina.sh and catalina.bat 3. When user enters catalina.[sh|bat] $verb help (or -h, --help?), execute one of the methods. In my mind, the above solution is quite straightforward. Any gotchas, or obvious problems? [0] https://bz.apache.org/bugzilla/show_bug.cgi?id=62140 Cheers, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org -- Marek Czernek JWS/JBCS Associate Quality Engineer, RHCA Find me at www.halfastack.com
TLSClientHelloExtractor explanation
Hi there, I'm looking at the class TLSClientHelloExtractor, specifically line [1]. The switch statement takes extensionType, which is a char, but the case of the switch statements are integers. So we're essentially comparing (char) a == (int) b. The possible values are: TLS_EXTENSION_SERVER_NAME=0 TLS_EXTENSION_ALPN = 16 What hex value do I have to send such that (char) x == 0, or (char) x == 16? Sending \x10 to trigger 16 (should be its ascii code) didn't help. Any help? :) Are we essentially converting char to ascii and comparing the two values? Essentially, I'm trying to trigger an old CVE, so I don't want to post the whole code here. [1] https://github.com/apache/tomcat/blob/trunk/java/org/apache/tomcat/util/net/TLSClientHelloExtractor.java#L145 Cheers, -- Marek Czernek JWS/JBCS Associate Quality Engineer, RHCA
Re: Setting up dev environment
Hi, What are you trying to achieve? If you want to develop Tomcat source code, i.e. debug/develop code that will be a part of the Tomcat code base, then as Violeta suggested, you could use the ant command (or simply import Tomcat source code into Idea and build/run the code via command line). If you want to develop apps for Tomcat, then you don't need Tomcat's source code. In such a case, you'll be better served by searching for specific technology, for example getting started with Servlets, and using Tomcat as the container for your code. On 10/9/18 10:58 AM, Harsha Suranjith Amarasiri wrote: Hi all, I need to set up tomcat development environment on Intellij Idea running on Windows 10 - 64 bit OS. I have searched, searched and searched and I cannot find a resource that will help me accomplish that. Also is there a developer quickstart for tomcat project ? It would be massively helpful for me to get started. Thank you very much. Regards, Harsha Amarasiri -- Marek Czernek JWS/JBCS Associate Quality Engineer, RHCA
Re: L10n / I18n
On 11/8/18 1:16 AM, Emmanuel Bourg wrote: Le 07/11/2018 à 23:36, Mark Thomas a écrit : WDYT? What about simplifying the issue by dropping the translations of the internal messages and retaining only the user facing messages (things like HTTP error messages that can appear in a normal request) ? +1 to this. Not sure if I'm the target audience, but I personally get quite annoyed at translated error messages into my native language (which is not English). When I get a non-English error message, I have to: * Think about what it means (because this is so non-standard in things like web-browsers) * Translate it into English to the best of my abilities * Search google using my sub-optimal translation, hoping I hit the nail on the head, and land in the correct SFO/forum answer Granted, this is a bit easier with Tomcat - I can grep the source for the non-English message, get the key, and grep the key for the full English original. Still, that's pretty annoying to me. Maybe this is different for widely-spoken languages, like Chinese, or Spanish, where people might have their own language variant of Stack Overflow, and similar forums... I think it's worth considering because: - The target audience of Tomcat is mainly developers and administrators which are used to read English text. - The coverage of the translations is rather low. - Maintaining the translations, the quality and the consistency is difficult and time consuming. - Sometimes the translation of the technical terms are a bit unusual and not as clear as the English counterpart. For example in French it isn't obvious that "gestionnaire de protocole" relates to ProtocolHandler which is an internal Tomcat concept. Other translations are even funny like "enrobeur de conteneur" for "wrapper container" (a pastry concept applied to a freight container?). This issue is so common with the French translation that many messages carry the English terms in parentheses to clarify the meaning. Emmanuel Bourg - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org -- Marek Czernek JWS/JBCS Associate Quality Engineer, RHCA