Back in February, user ‘toml at bitstatement’ (
http://www.gossamer-threads.com/lists/engine?user=7874;list=rt) posted a
question about interfacing with RT from Ruby via REST. That thread is
I am having a similar problem, but when I implemented the solution described
in that thread, RT still won’t accept the comment.
Request from my Ruby application (hostnames have been changed to protect the
POST /REST/1.0/ticket/5702/comment HTTP/1.1
Content-Type: multipart/form-data; boundary="905815"
Cookie: RT_SID_RTNAME.80=132575bdeee36284a05518c9b8080edf; path=/
test attachment content
Content-Disposition: form-data; name=“content”
Text: Adding attachment(s).
And the response from RT:
HTTP/1.1 200 OK
Server: Apache/2.2.3 (Unix) mod_ssl/2.2.3 OpenSSL/0.9.7f PHP/5.2.6
Content-Type: text/plain; charset=utf-8
RT/3.8.1 400 Bad Request
No attachment for attachment.txt.
I assume from the RT error message that it is parsing the “content” form
field, or else it wouldn’t know to look for the attachment.txt file, but I
can’t figure out what’s wrong. Anyone have any ideas?