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

Create ResourceUrlEncodingFilter for the reactive module [SPR-15012] #19579

Closed
spring-projects-issues opened this issue Dec 14, 2016 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 14, 2016

Rossen Stoyanchev opened SPR-15012 and commented

Now that #19098 is resolved we can create a ResourceUrlEncoding filter that will encode static resource URLs.


Affects: 5.0 M3

Issue Links:

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Apr 27, 2017

Rossen Stoyanchev commented

This solution for this has an impact on the fix for #19098 since the encoding of static resource URLs cannot be done with a synchronous signature (i.e. returning String). At present hte ResourceResolver and ResourceTransformer contracts are asynchronous (i.e. return Mono<String>).

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

Resolving as Won't Fix.

The transformation of a static resource URL is more involved and requires consuming the resource content (e.g. in order to compute an MD5 hash) which may be remote or otherwise still requires the use of AsynchronousFileChannel to read without blocking.

For the time being we will not introduce a ResourceUrlEncoding that plugs into the encodeUrl mechanism of ServerHttpResponse and thus does not affect other use cases for URL encoding such as those related to Spring Security for example which do not need an asynchronous, non-blocking contract.

Instead for encoding links to static resources (e.g. with versions) tje ResourceUrlProvider should be used directly.

@spring-projects-issues spring-projects-issues added status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants