title: Ignore WebSocket connection in Spring Security SavedRequest
body: <p>I have a Grails application with spring-security-core plugin and <a href="https://github.com/Atmosphere/atmosphere/wiki" rel="noreferrer">Atmosphere</a> framework.</p>
  
  <p>If I log out from a page that has opened a WebSocket connection, then Spring Security keeps the URL of the WebSocket connection as SavedRequest.</p>
  
  <pre><code>DEBUG savedrequest.HttpSessionRequestCache  - DefaultSavedRequest added to Session: DefaultSavedRequest[http://localhost:8080/formx/formX/update]
  DEBUG savedrequest.HttpSessionRequestCache  - DefaultSavedRequest added to Session: DefaultSavedRequest[http://localhost:8080/formx/formX/notifications/?X-Atmosphere-Transport=close&amp;X-Atmosphere-tracking-id=b5d8fde4-d950-41fd-9b49-02e06799a36f&amp;conversationId=988080042]
  </code></pre>
  
  <p>The first entry in the log has the correct value for SavedRequest, but somehow it is overwritten by the Atmosphere WebSocket connection.</p>
  
  <p>How do I tell Spring Security to not use the Atmosphere WebSocket connection as SavedRequest?</p>
  
  <p>I guess I can use some <a href="https://github.com/Atmosphere/atmosphere/wiki/Understanding-the-Atmosphere-Protocol" rel="noreferrer">Atmosphere Protocol Specific Header</a> to distinguish connections.</p>