Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8199683

jdk.incubator.http.HttpClient/jdk.incubator.http.HttpRequest change encoding of URI

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows

      Description

      FULL PRODUCT VERSION :
      java version "9.0.4"
      Java(TM) SE Runtime Environment (build 9.0.4+11)
      Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

      jdk 9.0.4

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.16299.248]

      A DESCRIPTION OF THE PROBLEM :
      HttpRequest httpGet = HttpRequest.newBuilder()
           .uri(new URI("http://data.matricula-online.eu/de/oesterreich/st-poelten/eggenburg/01%252F03/")
           .GET()
           .build();

      httpClient.send(httpGet, HttpResponse.BodyHandler.asByteArray());


      The URI contains "01%252F03"
      this is changed to "01%2F03"

      before it is sent over the line. This results in Error 404 from the server.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      URI encoding should not change
      ACTUAL -
      The URI contains "01%252F03"
      this is changed to "01%2F03"


      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dfuchs Daniel Fuchs
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: