1. 18 7月, 2018 11 次提交
  2. 17 7月, 2018 10 次提交
  3. 16 7月, 2018 5 次提交
  4. 15 7月, 2018 2 次提交
  5. 14 7月, 2018 2 次提交
  6. 13 7月, 2018 3 次提交
    • R
      Add maxSessions, getSessions, removeExpiredSessions · 43fbd632
      Rossen Stoyanchev 提交于
      This commit removes the session threshold check added recently which
      is not effective since maxIdleTime is usually much longer than the
      frequency of checks. The lazy triggering of expiration checks during
      create or retreive are simple and the most effective
      
      This commit also adds a maxSessions limit on the total number of
      sessions that can be created at any one time, a getSessions method
      for management purposes, and a removeExpiredSessions public API
      for manual triggering of expiration checks.
      
      Issue: SPR-17020, SPR-16713
      43fbd632
    • B
      Fix checkstyle issues · 75fa9c42
      Brian Clozel 提交于
      75fa9c42
    • B
      Improve unknown status codes handling by WebClient · 038af9a3
      Brian Clozel 提交于
      Prior to this commit, `WebClient` would throw `IllegalArgumentException`
      when receiving an HTTP response with an unknown HTTP status code.
      
      This commit is a follow up of SPR-16748 (supporting non-standard HTTP
      status codes on the reactive `ClientHttpResponse`), and is mirroring
      SPR-15978 (supporting non-standard HTTP status codes in `RestTemplate`).
      
      With this change, `WebClient` now tolerates unknown status codes in some
      cases, while not offering that choice as a first class citizen:
      `HttpStatus` is still the preferred way to deal with HTTP status codes.
      
      Here's how `WebClient` will behave when fetching the full response:
      
      ```
      // Given a remote endpoint returning a "123" HTTP status code
      Mono<ClientResponse> result = this.webClient.get()
      				.uri("/status/123")
      				.exchange();
      
      // will still throw an IllegalArgumentException
      HttpStatus status = result.block().statusCode();
      
      // is safe and will return 123
      int statusCode = result.block().rawStatusCode();
      ```
      
      Resolving directly the response body with `retrieve()` is different.
      
      ```
      // will send an error signal with a UnknownHttpStatusCodeException
      Mono<String> result = this.webClient.get()
      				.uri("/status/123")
      				.retrieve()
      				.bodyToMono(String.class);
      ```
      
      In general, `WebClient` will provide high-level support
      for well-known HTTP status codes, like error handling with
      `WebClient.ResponseSpec#onStatus`.
      
      For such support with unknown status codes, it is better to rely
      on lower level constructs such as `ExchangeFilterFunction`.
      
      Issue: SPR-16819
      038af9a3
  7. 12 7月, 2018 2 次提交
  8. 11 7月, 2018 5 次提交