Job import only accepts multipart/form-data, but docs say application/x-www-form-urlencoded.
Reported by aaron.meier | March 23rd, 2011 @ 08:01 AM | in Rundeck 1.3 (closed)
Sending an XML job via POST
application/x-www-form-urlencoded:
ie:
xmlBatch=%3Cjob%3E%0A++++%3Cname%3ESample+Job%3C%2Fname%3E%0A++++%3Cgroup%3Eadmins%3C%2Fgroup%3E%0A++++%3Cproject%3EHC%3C%2Fproject%3E%0A++++%3Cerror%3ETest+Error+message%3C%2Ferror%3E+%0A%3C%2Fjob%3E%0A%0A
Results in The input was not the expected content type
But changing the content type and encoding to
multipart/form-data, ie:
POST DATA: <poster_encode.multipart_yielder instance at
0xb7b3fa8c>
Results in 15My Special JobHC/cmdcenter/job/show/15
Using Python urllib2, passing cookie.
From gschueler:
[16:52] ameier: it is expecting a multipart request [16:53] i.e.
Content-type: multipart/form-data [16:56] i see the docs specify
"application/x-www-form-urlencoded" .... i think that is wrong
[16:56] however that should definitely be supported.
[16:56] ameier: can you file this as a bug?
Comments and changes to this ticket
-
Alex-SF March 23rd, 2011 @ 08:34 AM
- Milestone set to Rundeck 1.3
- Milestone order changed from 20 to 0
-
Deleted User April 20th, 2011 @ 05:11 PM
(from [c28528f74210042b57babf59ec86d266b8f85489]) Update upload/apiJobsImport actions to support form content as well as multipart upload [#246] https://github.com/dtolabs/rundeck/commit/c28528f74210042b57babf59e...
-
Deleted User April 20th, 2011 @ 05:11 PM
- State changed from new to resolved
(from [69f14e7d90a7900043d918154762cbafe80372d5]) Fix /jobs/import api endpoint expected content and documentation [#246 state:resolved] https://github.com/dtolabs/rundeck/commit/69f14e7d90a7900043d918154...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues
People watching this ticket
Referenced by
- 246 Job import only accepts multipart/form-data, but docs say application/x-www-form-urlencoded. (from [c28528f74210042b57babf59ec86d266b8f85489]) Update ...
- 246 Job import only accepts multipart/form-data, but docs say application/x-www-form-urlencoded. (from [69f14e7d90a7900043d918154762cbafe80372d5]) Fix /jo...