Skip to content

encoding of the path does not escape spaces #319

@Jebusito

Description

@Jebusito

Migrated from a really old Unirest version (1.4.10).
On that version, it escaped the spaces as %20, but now it doesn't so it seems like a regression.

Exception given:
Caused by: java.net.URISyntaxException: Illegal character in path at index 50: http://192.168.1.13:8000/v1/archivo/demo/expresion interes.pdf

To reproduce
GetRequest request = Unirest.get(any given url with a space);

Expected behavior
The url should be encoded to
http://192.168.1.13:8000/v1/archivo/demo/expresion%20interes.pdf

Environmental Data:

  • Java 1.8.0_221b-11
  • Unirest Version [3.1.04]

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugOh Noes! A bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions