Skip to content

Conversation

@Fuud
Copy link
Contributor

@Fuud Fuud commented Apr 12, 2022

Hi,

This PR:

  1. restored test missed after 4fa39f2 (fix deprecations and tests)
  2. fixes timeout handling
  3. fixes thread local handling when flushing in async thread

About the last:
*.servlet.InstanceProxyController flushes request in different thread where no SecurityContext and other thread locals are set.
request.flush() lead to incorrect context will be written to http session (see for example, org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper#onResponseCommitted).
This behaviour can be disabled with startAsync() (take a look at org.springframework.security.web.context.HttpSessionSecurityContextRepository.SaveToSessionRequestWrapper#startAsync())

@Fuud
Copy link
Contributor Author

Fuud commented Apr 26, 2022

Any updates?

@andreasfritz
Copy link
Contributor

Thanks for the fix!

Can you please provide a test for point 3 (fixes thread local handling when flushing in async thread) that fails without your code changes.

…in/server/web/AbstractInstancesProxyControllerIntegrationTest.java
@SteKoe SteKoe merged commit 73fadf6 into codecentric:master Jul 22, 2022
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.

4 participants