title: Missing flash attributes after redirect in Spring MVC 4.3
body: <p>My controller methods look like the following:</p>
  
  <pre><code>@RequestMapping(value = "/update", method = RequestMethod.POST)
  public String handleSaveRequest(RedirectAttributes redirectAttributes,
                                  Model model) {
      redirectAttributes.addFlashAttribute("myFlashAttr", "FOOBAR");
      return "redirect:/confirmationpage?myAttr=Some Value";
  }
  
  @RequestMapping(value = "/confirmationpage", method = RequestMethod.GET)
  public String confirmationPage(@RequestParam String myAttr,
                                 @ModelAttribute("myFlashAttr") String flashAttr,
                                  Model model) {
      logger.info("Param: " + myAttr);
      logger.info("FlashAttr: " + flashAttr);
      // Do Some stuff
      return "path/to/confirmation.jsp";
  }
  </code></pre>
  
  <p>I was originally using Spring 4.0 and this was working as expected. When I was redirected to the confirmation page I had <code>myAttr = "Some Value"</code> and <code>flashAttr = "FOOBAR"</code>. However after upgrading to Spring 4.3 <code>flashAttr</code> was empty string (ie <code>myAttr = "Some Value"</code> and <code>flashAttr = ""</code>).</p>
  
  <p>After shooting in the dark for a bit I found that replacing the whitespace in the redirect URL with <code>"%20"</code> (ie <code>"redirect:/confirmationpage?myAttr=Some%20Value"</code>) did the trick. After making this change the log output was <code>myAttr = Some Valu"</code> and <code>flashAttr = FOOBAR</code> as expected.</p>
  
  <p>So I have a few questions really:</p>
  
  <ol>
  <li>What changed between Spring 4.0 and 4.3 that causes this problem?</li>
  <li>Why would URL encoding cause problems with session attributes?</li>
  <li>What is the "correct" way to handle URL encoding on redirects in Spring MVC 4.3? I was always under the impression that Spring handled this for me in the <a href="https://docs.spring.io/autorepo/docs/spring-framework/4.3.5.RELEASE/javadoc-api/org/springframework/web/servlet/view/UrlBasedViewResolver.html" rel="nofollow noreferrer">UrlBasedViewResolver</a> but now I am second-guessing that...</li>
  </ol>