Skip to content

Problems with spaces in paths and job names #144

Description

@shivkaushal

I tried to use this library for something I was getting going at work and it fell over at certain parts because I was running against a Jenkins instance that spaces in the path to jobs (using the folder plugin, I think) as well as the job names.

I was able to work around it by making the following change in the private URI api(String path) method in JenkinsHttpClient.java:

< return uri.resolve("/").resolve(path);
---
> return uri.resolve("/").resolve(path.replace(" ","%20"));

This was a pretty quick, hacky fix that resolved my issue.... Would this be reasonable to submit as a pull request or would you want to approach it in a different (i.e. better) way?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions