#246 ✓resolved
aaron.meier

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

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.

New-ticket Create new ticket

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

Shared Ticket Bins

People watching this ticket

Referenced by

Pages