jenkinsci / jenkinsci/java-client-api
I encountered a ClientProtocolException problem
- Lingua principale
- Java
- Stelle
- 913
- Fork
- 466
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I encountered a ClientProtocolException problem when I called the build.Stop() method with Jenkins server version 2.32.2;
`public String Stop() throws HttpResponseException, IOException {`
` try { `
`return client.get(url + "stop");`
`} catch (IOException ex) {`
`if (((HttpResponseException) ex).getStatusCode() == 405) {`
`stopPost();`
`return ""; `
` } `
`}`
` return "";`
`}`
This version of the stop API should be Post on http://url/job/testJob/1/stop, but is actually call the Get http://url/job/testJob/1/stop/api/json, resulting in Jenkins CircularRedirectException from server
>
>
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Start by inspecting the Stop() and stopPost() methods and how client.get constructs the request URL. Reproduce the call against Jenkins 2.32.2 and verify that stopping a build uses the POST endpoint rather than requesting /stop/api/json with GET. Done means the stop operation completes without the redirect or ClientProtocolException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100