-
Notifications
You must be signed in to change notification settings - Fork 2
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
Doesn't work when serving from uberjar #3
Comments
Patches welcome, or I'll get to this eventually. |
I tried to make a patch but got hung up on some limitations of my Java interop knowledge. I went for a temporary fix for now but will be happy to submit a patch if I get one working. Cheers. |
@danielcompton I might be missing something, but it seems that It even returned the same checksum value as when the file is passed as a So I think might just work if modifying the check here to also accept |
Great! I'm happy to take a patch for this. |
For someone looking at it in the future, I didn't manage to figure out a way with JarURLInputStream to stream file contents and calculate checksum at the same time. Specifically what I was missing is to be able to "reset" JarURLInputStream after it has been consumed for checksum calculation and return it in result. I ended up calculating checksum of all static files (js,css,images) during the uberjar build process and storing the sums in a separate file in |
Files served from an uberjar are instances of
JarURLInputStream
notFile
, therefore no etag is calculated.The text was updated successfully, but these errors were encountered: