Here's a wireshark capture of my test script (stuff in square brackets I have removed):
---
GET /jenkins/queue/api/json?depth=0 HTTP/1.1
Accept-Encoding: identity
Host: tom-jdvm:8080
Connection: close
Authorization: Basic [password, encoded]
User-Agent: Python-urllib/2.6
With the change I noted in the bug report the last request is a GET and the response is 302 FOUND with a redirect, and most importantly the job gets triggered.
Here's a wireshark capture of my test script (stuff in square brackets I have removed): queue/api/ json?depth= 0 HTTP/1.1
---
GET /jenkins/
Accept-Encoding: identity
Host: tom-jdvm:8080
Connection: close
Authorization: Basic [password, encoded]
User-Agent: Python-urllib/2.6
--- javascript; charset= UTF-8
HTTP/1.1 200 OK
Server: Winstone Servlet Engine v0.9.10
Content-Type: application/
Content-Length: 12
Connection: Close
Date: Fri, 15 Jul 2011 14:55:05 GMT
X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
{"items":[]} job/poetry_ writer/ api/json? depth=0 HTTP/1.1
---
GET /jenkins/
Accept-Encoding: identity
Host: tom-jdvm:8080
Connection: close
Authorization: Basic [password, encoded]
User-Agent: Python-urllib/2.6
--- javascript; charset= UTF-8
HTTP/1.1 200 OK
Server: Winstone Servlet Engine v0.9.10
Content-Type: application/
Content-Length: 3114
Connection: Close
Date: Fri, 15 Jul 2011 14:55:05 GMT
X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
[Load of JSON removed] job/poetry_ writer/ buildWithParame ters?[URL- encoded parameter string] HTTP/1.1 x-www-form- urlencoded
---
POST /jenkins/
Accept-Encoding: identity
Content-Length: 0
Host: tom-jdvm:8080
User-Agent: Python-urllib/2.6
Connection: close
Content-Type: application/
Authorization: Basic [password, encoded]
--- charset= UTF-8 83cc6a68eea0fc3 031b92df6dcb9b2 eb; Path=/jenkins
HTTP/1.1 403 Forbidden
Server: Winstone Servlet Engine v0.9.10
Content-Length: 305
Connection: Close
Content-Type: text/html;
Date: Fri, 15 Jul 2011 14:55:05 GMT
X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
Set-Cookie: JSESSIONID=
With the change I noted in the bug report the last request is a GET and the response is 302 FOUND with a redirect, and most importantly the job gets triggered.