Jonny
Jonny

Reputation: 100

OTS parsing error: Size of decompressed WOFF 2.0 is less than compressed size when serving fonts via Spring Boot and Tomcat

When I load my Angular app directly from the hard disk, it functions correctly, except for a server communication issue due to an incorrect URL, but the FontIcons worked. However, when I deploy the same app through a Spring Boot backend on a Tomcat application server, I encounter the following error message: "OTS parsing error: Size of decompressed WOFF 2.0 is less than compressed size."

So it seems to be related to Spring Boot or Tomcat.

Has anyone else faced this issue before or can provide insights into what might be causing this error when fonts are served via Spring Boot and Tomcat? Any suggestions on how to troubleshoot and resolve this problem would be greatly appreciated. Thank you!

Edit: The first Values (Hex) compared:

on Disk : 77 4F 46 32 00 01 00 00 00 01 F5 60 00 0F 00 00

httpCall: 77 4F 46 32 00 01 00 00 00 01 EF BF BD 60 00 0F

Spring Boot / Tomcat corrupts the data. Header from the response:

HTTP/1.1 200
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Last-Modified: Tue, 26 Sep 2023 12:54:26 GMT
Accept-Ranges: bytes
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Type: font/woff2
Content-Length: 128352
Date: Fri, 29 Sep 2023 06:51:55 GMT
Keep-Alive: timeout=20
Connection: keep-alive

Second Edit: Don`t know what I changed (I thought just something in Eclipse classpath) but it works now in Chrome (Version 116.0.5845.141), but not on the edge Browser (Version 117.0.2045.36).

Upvotes: 0

Views: 2894

Answers (0)

Related Questions