jenkinsci / jenkinsci/java-client-api

Regression of pull request #73 : URL encoding method is invalid for non-standard job

Offen
#416 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
913
Forks
466
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Java-client-api version : 0.4.0-SNAPSHOT
Jenkins Server Version : 2.150.2

Latest version without Guava can't get xml config of a job with a space in its name:

org.apache.http.client.HttpResponseException: status code: 404, reason phrase: Not Found

at com.offbytwo.jenkins.client.validator.HttpResponseValidator.validateResponse(HttpResponseValidator.java:11)
at com.offbytwo.jenkins.client.JenkinsHttpClient.get(JenkinsHttpClient.java:170)
at com.offbytwo.jenkins.JenkinsServer.getJobXml(JenkinsServer.java:524)

Just looked at the code and since 0.4.0-SNAPSHOT with guava removal, a regression of pull request #73 occurs : job names with a space in them now contains the symbol "+" again, but there is an explicit comment in the latest code asking for the opposite
`// jenkins doesn't like the + for space, use %20 instead`

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start in JenkinsHttpClient.java around the request URL construction and then follow JenkinsServer.getJobXml, comparing the current encoding with the behavior described in pull request #73. Verify that job names containing spaces use %20 rather than + and that XML retrieval succeeds for a non-standard job name.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
api
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.