-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Provide correct mime type for javascript and css #504
Conversation
@Artur- Agree that this needs to be fixed. I've changed the implementation to be more generic instead of hard-coding two types. Could you please have a look? |
It does not seem to work for me. |
Hmm can you replicate that in your testcase? Because that succeeds with the implementation... |
It works on my local JVM, fails when deployed |
Hmm ok did some more testing:
Which runtime are you using? |
Ok I was able to reproduce it. Looks like the method is highly platform specific but I want to avoid pulling in another library like Apache Tika to solve it. |
Made another change, this implementation should be close to what you proposed (using the filename to guess the context type). |
Still does not work in my case: With and the result is then |
It turned out the related mailcap package is present on Amazon Linux but not part of the Lambda managed runtime. Still waiting for feedback from our service team, afterwards we'll make a decision on how to fix it. |
Any luck in couple of months? :) |
Our Lambda service team confirmed they will fix it but I can't tell a date yet. Afterwards |
The correct mimetype for javascript is a requirement when loading javascript modules#
…les.probeContentType returns null on Lambda)
…ntent type cannot be resolved (as per servlet-api docs), a fix to make probeContentType work in Lambda execution environment is being worked on by the Lambda service team
Starting with 2.0 we return |
The Java 21 managed runtime that was just released contains the necessary fix to make |
The correct mimetype for javascript is a requirement when loading javascript modules