You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/03/13 13:33:54 UTC
[Bug 60852] New: Connector property compressableMimeType incorrectly
spelled
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
Bug ID: 60852
Summary: Connector property compressableMimeType incorrectly
spelled
Product: Tomcat 9
Version: 9.0.0.M17
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: 1983-01-06@gmx.net
Target Milestone: -----
The word "compressable" does not exist according to Merriam Webster or the
Oxford Dictionary. It seems simply to be a typo:
> $ grep -ri --exclude-dir=.svn compressable .
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: private String compressableMimeType = "text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml";
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: private String[] compressableMimeTypes = null;
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: public String getCompressableMimeType() { return compressableMimeType; }
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: public void setCompressableMimeType(String valueS) {
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: compressableMimeType = valueS;
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: compressableMimeTypes = null;
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: public String[] getCompressableMimeTypes() {
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: String[] result = compressableMimeTypes;
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: StringTokenizer tokens = new StringTokenizer(compressableMimeType, ",");
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: compressableMimeTypes = result;
> ./java/org/apache/coyote/http11/AbstractHttp11Protocol.java: processor.setCompressableMimeTypes(getCompressableMimeTypes());
> ./java/org/apache/coyote/http11/Http11Processor.java: protected String[] compressableMimeTypes;
> ./java/org/apache/coyote/http11/Http11Processor.java: * @param compressableMimeTypes MIME types for which compression should be
> ./java/org/apache/coyote/http11/Http11Processor.java: public void setCompressableMimeTypes(String[] compressableMimeTypes) {
> ./java/org/apache/coyote/http11/Http11Processor.java: this.compressableMimeTypes = compressableMimeTypes;
> ./java/org/apache/coyote/http11/Http11Processor.java: private boolean isCompressable() {
> ./java/org/apache/coyote/http11/Http11Processor.java: if (compressableMimeTypes != null) {
> ./java/org/apache/coyote/http11/Http11Processor.java: return (startsWithStringArray(compressableMimeTypes,
> ./java/org/apache/coyote/http11/Http11Processor.java: boolean isCompressable = false;
> ./java/org/apache/coyote/http11/Http11Processor.java: isCompressable = isCompressable();
> ./java/org/apache/coyote/http11/Http11Processor.java: if (isCompressable) {
> ./java/org/apache/coyote/http11/Http11Processor.java: if (isCompressable) {
> ./webapps/docs/config/http.xml: <attribute name="compressableMimeType" required="false">
A fix is fairly easy, but would require an incompatible change. This is
possible in Tomcat 9 only. For Tomcat 8.5.x one could introduce new methods
(getter, setter) calling old ones, mark as @Deprecated and change http.xml for
the new one only. Old config should continue to run as expected.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
--- Comment #3 from Michael Osipov <19...@gmx.net> ---
(In reply to Christopher Schultz from comment #2)
> This can be done in a backward-compatible way. It's just an alias of an
> existing setting (or, rather, re-naming an existing setting and then
> creating an alias with the old name).
>
> Would you care to submit a patch?
Yes, of course. I will start with Tomcat 9 first. Do you want me to simply
break code in 9? I think this is OK since it is not GA yet.
When this is done, I will work in 8.5.
Can someone merge 60851 first? Both patches would cause a conflict.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
--- Comment #8 from Michael Osipov <19...@gmx.net> ---
Created attachment 34841
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34841&action=edit
Trivial patch for Tomcat 9
Here is a trivial patch for Tomcat 9. No backwards compat retained. I think
this is OK for Tomcat 9, but not suited for 8.5.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Mark Thomas <ma...@apache.org> ---
Thanks for the patch.
I applied a variation with deprecation to 9.0.x, back-ported all the way back
to 7.0.x and removed the deprecated methods from 9.0.x.
Fixed in:
- trunk for 9.0.0.M19 onwards
- 8.5.x for 8.5.13 onwards
- 8.0.x for 8.0.43 onwards
- 7.0.x for 7.0.77 onwards
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
--- Comment #5 from Michael Osipov <19...@gmx.net> ---
(In reply to Konstantin Kolinko from comment #4)
> 1. Do both American English and British English consider this a typo?
>
> Wictionary has this spelling listed,
> https://en.wiktionary.org/wiki/compressable
Strange, this isn't listed neither by Oxford, Merriam-Webster, nor Cambridge. I
wouldn't take Wiktionary as a canonical reference for the English language.
What do native speakers say?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
--- Comment #4 from Konstantin Kolinko <kn...@gmail.com> ---
1. Do both American English and British English consider this a typo?
Wictionary has this spelling listed,
https://en.wiktionary.org/wiki/compressable
2. I think it would be better to have a regular expression instead of a list.
To cover foo+xml, foo+json mime types.
See bug 60851 and see <mime-type>s in the default conf/web.xml for examples?
3. Beware of BREACH.
https://en.wikipedia.org/wiki/BREACH_(security_exploit)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
--- Comment #6 from Mark Thomas <ma...@apache.org> ---
This native speaker says "compressable" is a common misspelling of
"compressible".
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
--- Comment #7 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Mark Thomas from comment #6)
> This native speaker says "compressable" is a common misspelling of
> "compressible".
+1
Tomcat is "able" to "compress" a file type, ergo "compressable". Of course, as
I type that into my web browser, it kindly tells me it should be "compressible"
(at least in US English).
Mistakes happen. Let's just make an alias and not mince around too much over a
spelling issue.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
--- Comment #2 from Christopher Schultz <ch...@christopherschultz.net> ---
This can be done in a backward-compatible way. It's just an alias of an
existing setting (or, rather, re-naming an existing setting and then creating
an alias with the old name).
Would you care to submit a patch?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60852] Connector property compressableMimeType incorrectly
spelled
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60852
--- Comment #1 from Michael Osipov <19...@gmx.net> ---
The correct term is "compressible", a => i
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org