In C# mache ich Ähnliches. Content-Disposition ist allerdings der Dateiname. Der Inhalt muss als Body geschickt werden.
Guck Dir mal das hier an: http://stackoverflow.com/questions/24717629/in-php-how-do-i-reliably-transfer-binary-data-as-body-of-an-http-response
Rolf