jetty.project
jetty.project copied to clipboard
Serve .ico as image/vnd.microsoft.icon
as per https://www.iana.org/assignments/media-types/image/vnd.microsoft.icon
@maffe you need to sign the Eclipse ECA in order to contribute. Seee https://github.com/jetty/jetty.project/blob/jetty-12.0.x/CONTRIBUTING.md.
Be careful here.
The extension *.ico can be either the Microsoft format (what this PR is attempting to change to) or a PNG or a JPG (what the image/x-icon) supports.
See also https://stackoverflow.com/questions/13827325/correct-mime-type-for-favicon-ico
@joakime if you think x-icon is better, then let's close this, unless there is clear evidence otherwise.
The file extension '*.ico' can be either Microsoft icon, or PNG/JPG.
It's one of those things that will be application specific.
I think we should stick with whatever our default icon format is, and make sure it can be configured for the other mimetype if the application wants to use it.
@maffe Do you have a read world problem with the existing mapping? If not, we are inclined to leave it as is.
I think we should merge this.
Our own favicon.ico is reported as MS Windows icon resource
[jetty-12.0.x]$ find . -name "*.ico" -exec file {} \;
./jetty-ee10/jetty-ee10-demos/jetty-ee10-demo-jetty-webapp/src/main/webapp/favicon.ico: MS Windows icon resource - 1 icon, 16x16, 32 bits/pixel
./jetty-ee10/jetty-ee10-maven-plugin/src/it/jetty-start-gwt-it/beer-server/src/main/webapp/favicon.ico: MS Windows icon resource - 1 icon, 16x15, 32 bits/pixel
./jetty-ee8/jetty-ee8-maven-plugin/src/it/jetty-start-gwt-it/beer-server/src/main/webapp/favicon.ico: MS Windows icon resource - 1 icon, 16x15, 32 bits/pixel
./jetty-home/src/main/resources/modules/demo.d/root/favicon.ico: MS Windows icon resource - 1 icon, 16x16, 32 bits/pixel
./jetty-core/jetty-server/src/main/resources/org/eclipse/jetty/server/favicon.ico: MS Windows icon resource - 1 icon, 16x16, 32 bits/pixel
./jetty-ee11/jetty-ee11-runner/target/classes/org/eclipse/jetty/server/favicon.ico: MS Windows icon resource - 1 icon, 16x16, 32 bits/pixel
./jetty-ee11/jetty-ee11-demos/jetty-ee11-demo-jetty-webapp/target/jetty-ee11-demo-jetty-webapp-12.1.0-SNAPSHOT/favicon.ico: MS Windows icon resource - 1 icon, 16x16, 32 bits/pixel
./jetty-ee9/jetty-ee9-demos/jetty-ee9-demo-jetty-webapp/src/main/webapp/favicon.ico: MS Windows icon resource - 1 icon, 16x16, 32 bits/pixel
./jetty-ee9/jetty-ee9-nested/src/main/resources/org/eclipse/nested/favicon.ico: MS Windows icon resource - 1 icon, 16x16, 32 bits/pixel
./jetty-ee9/jetty-ee9-maven-plugin/src/it/jetty-start-gwt-it/beer-server/src/main/webapp/favicon.ico: MS Windows icon resource - 1 icon, 16x15, 32 bits/pixel
Also, if we ask Java's java.nio.file.Files.probeContentType(Path) we get ...
[jetty-12.0.x]$ jshell
| Welcome to JShell -- Version 17.0.10
| For an introduction type: /help intro
jshell> var ico = Path.of("./jetty-home/src/main/resources/modules/demo.d/root/favicon.ico")
ico ==> ./jetty-home/src/main/resources/modules/demo.d/root/favicon.ico
jshell> Files.probeContentType(ico)
$2 ==> "image/vnd.microsoft.icon"
jshell>
I will not create an Eclipse account (I don’t think I can receive e-mails at users.noreply.github.com and I don’t want to provide the information the Eclipse registration form requires), but feel free to do whatever you want with this trivial PR. I don’t think the tiny bit of knowledge it contains can be copyrighted.
I will not create an Eclipse account (I don’t think I can receive e-mails at users.noreply.github.com and I don’t want to provide the information the Eclipse registration form requires), but feel free to do whatever you want with this trivial PR. I don’t think the tiny bit of knowledge it contains can be copyrighted.
The knowledge might not be copyrighted, but this expression of it can be.
@joakime let's close this PR and ask a team member that had not participated in it to make the change.
@maffe thanks for the contribution of there idea if not the coffee itself.
@maffe ok, thanks. Closing this PR in favour of #12087.