Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 5.0.3
    • Fix Version/s: None
    • Component/s: Web:Client
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      final URI uri = UriComponentsBuilder.fromUriString(destinationAddress).queryParams(serverHttpRequest.getQueryParams()).build().toUri();
              Mono<RepetitionReadClientResponse> clientResponse = webClient.method(Objects.requireNonNull(serverHttpRequest.getMethod()))
                  .uri(uri)
                  .headers(httpHeaders -> httpHeaders.putAll(serverHttpRequest.getHeaders()))
                  .body(BodyInserters.fromPublisher(serverHttpRequest.getBody(), DataBuffer.class))
                  .exchange()

      if uri contains chinese character. then body will be empty....

      another way.

      final String uri = UriComponentsBuilder.fromUriString(destinationAddress).queryParams(serverHttpRequest.getQueryParams()).build().toUriString();
              log.debug("forward request to " + uri);
      
              Mono<RepetitionReadClientResponse> clientResponse = webClient.method(Objects.requireNonNull(serverHttpRequest.getMethod()))
                  .uri(uri)
                  .headers(httpHeaders -> httpHeaders.putAll(serverHttpRequest.getHeaders()))
                  .body(BodyInserters.fromPublisher(serverHttpRequest.getBody(), DataBuffer.class))
                  .exchange()
                  .map(DefaultRepetitionReadClientResponse::new);
      

       it's be OK.

       uri is 

      http://{{host}}:9032/test/chinese-param?a=1222121&b=中文

        Attachments

          Activity

            People

            • Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              yannxia yannxia
              Last updater:
              Spring Issuemaster
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 1 week, 4 days ago