title: Spring MVC - Encoded URL is seen as decoded?
body: <p>Basically, what I am trying to do is make a request like this:</p>
  
  <pre><code>http://localhost:8085/api/candidates/searchWithFacet?q=helmut&amp;page=0&amp;size=20&amp;fq=skills%3A%22Keine%20Angabe%22&amp;
  </code></pre>
  
  <p>but Spring MVC is throwing this error:</p>
  
  <pre><code>java.net.URISyntaxException: Illegal character in query at index 51: /api/candidates/searchWithFacet?q=helmut&amp;fq=skills:"Keine Angabe"?page=0&amp;size=20
  </code></pre>
  
  <p>I don't understand why it is stating that I have an illegal character as I am encoding it. I have also tried encoding the whole URL, not just the last part of it like this:</p>
  
  <pre><code>http://localhost:8085/%2Fapi%2Fcandidates%2Fsearch%3Fq%3Dhelmut%26page%3D0%26size%3D20
  </code></pre>
  
  <p>The error I am receiving here is 400 - Bad Request.</p>
  
  <p>My two involved Controller functions are:</p>
  
  <pre><code>@Timed
  @RequestMapping(value = "/candidates/search", method = RequestMethod.GET, produces = {
          MediaType.APPLICATION_JSON_VALUE })
  public ResponseEntity&lt;CandidateListDTO&gt; searchCandidatesWithFaceting(@RequestParam(name = "q") String query,
          Pageable page) throws SolrServerException, URISyntaxException {
  </code></pre>
  
  <p>...</p>
  
  <pre><code>@Timed
  @RequestMapping(value = "/candidates/searchWithFacet", method = RequestMethod.GET, produces = {
          MediaType.APPLICATION_JSON_VALUE })
  public ResponseEntity&lt;CandidateListDTO&gt; getCandidatesWithFacet(@RequestParam(name = "q") String query,
          @RequestParam(name = "fq") String facetQuery, Pageable page)
          throws SolrServerException, URISyntaxException {
  </code></pre>
  
  <p>Any help is appreciated, thanks in advance! :-)</p>