Skip to content
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

Assets controller sends constant etag if path has a space in the name #3722

Merged

Conversation

jroper
Copy link
Member

@jroper jroper commented Dec 8, 2014

On OSX 10.9 (and probably everywhere else).

If the application is running under a path with a space in the name, then the code that gets the last modified date for an asset fails to find the file, and returns 0 (epoch). In dev mode, since the etag is a digest of last modified, this means the asset etag is always constant, which means even after changing an asset, Play will always return 304 not modified.

The effect is that changes to assets are never reflected in the browser.

@jroper
Copy link
Member Author

jroper commented Dec 8, 2014

Pull request attached.

Interestingly, I scanned back through the code history, this bug has existed for as long as last modified has been used to generate the etag - over 3 years.

pvlugter added a commit that referenced this pull request Dec 8, 2014
Assets controller sends constant etag if path has a space in the name
@pvlugter pvlugter merged commit 0fed5c7 into playframework:master Dec 8, 2014
@jroper jroper deleted the 3722-assets-last-modified-escaped branch March 5, 2015 00:22
ClaraAllende pushed a commit to ClaraAllende/playframework that referenced this pull request Aug 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants