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

#springUrl does not run encodeURL() [SPR-5134] #9807

Closed
spring-projects-issues opened this issue Sep 1, 2008 · 0 comments
Closed

#springUrl does not run encodeURL() [SPR-5134] #9807

spring-projects-issues opened this issue Sep 1, 2008 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Sutra Zhou opened SPR-5134 and commented

The API of JEE says:
Encodes the specified URL by including the session ID in it, or, if encoding is not needed, returns the URL unchanged. The implementation of this method includes the logic to determine whether the session ID needs to be encoded in the URL. For example, if the browser supports cookies, or session tracking is turned off, URL encoding is unnecessary.

For robust session tracking, all URLs emitted by a servlet should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.

So we should do this:

#**

  • springUrl
  • Takes a relative URL and makes it absolute from the server root by
  • adding the context root for the web application.
    *#
    #macro( springUrl $relativeUrl )$response.encodeURL("$springMacroRequestContext.getContextPath()${relativeUrl}")#end

No further details from SPR-5134

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 M2 milestone 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) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants