RT 4.4.7 and comments with attachments via the REST API

Hi all,

Shouldn’t the RT REST API be able to parse this (localhost:9999 is my nc -l 9999 for testing):

POST /123456/comment?user=blah&pass=blah HTTP/1.1
Accept: application/json
Host: localhost:9999
User-Agent: hackney/1.20.1
Content-Type: multipart/form-data; boundary=---------------------------gtbhtqhcqngrgdsg
Content-Length: 43772

-----------------------------gtbhtqhcqngrgdsg
content-length: 85
content-type: application/octet-stream
content-disposition: form-data; name="content"

id: 123456
Action: comment
Text: Testing
Attachment: Basecamp-Invoice-2023-01-20.pdf

-----------------------------gtbhtqhcqngrgdsg
content-length: 43277
content-type: application/pdf
content-disposition: form-data; name=attachment_1; filename=Basecamp-Invoice-2023-01-20.pdf

%PDF-1.4

because it only results in:

"RT/4.4.7 400 Bad Request\n\n# No attachment for Basecamp-Invoice-2023-01-20.pdf\n\n\n"

UNLESS the name and filename are in quotes like:

content-disposition: form-data; name="attachment_1"; filename="Basecamp-Invoice-2023-01-20.pdf"

I’ll check the HTML spec too. Took me hours to get this to work, so will add it to the Wiki once confirmed.

Thanks.