tweeper.php: support "application/octet-stream" as an enclosure content type
authorAntonio Ospite <ao2@ao2.it>
Sat, 29 Oct 2016 17:17:00 +0000 (19:17 +0200)
committerAntonio Ospite <ao2@ao2.it>
Sat, 29 Oct 2016 17:17:00 +0000 (19:17 +0200)
commit69e49c61d409dabcaf518e7bc02c1f68923b871b
tree65136c1c5d55a7f77a2ab91436070cecfc271c15
parent16130ed8bb988db5261c01c1d0e5a28006a395e4
tweeper.php: support "application/octet-stream" as an enclosure content type

This allows binary attachment without a more specific content type to be
supported for the enclosure element.

Adding "application/octet-stream" also covers the weird case of servers
sending multiple Content-Type headers, e.g.:

< HTTP/1.1 200 OK
< Server: Apache
< ETag: "a46d495ba00c35580f83344dd523ece2:1473631283"
< Last-Modified: Sun, 11 Sep 2016 22:01:22 GMT
< Accept-Ranges: bytes
< Content-Length: 14346711
< Content-Type: audio/mpeg
< Content-Type: application/octet-stream
< content-disposition: attachment
< Date: Mon, 26 Sep 2016 23:36:11 GMT
< Connection: keep-alive
< Content-Type: application/octet-stream
< content-disposition: attachment

In this case the ideal solution would be to use the more _specific_
content type, but CURL just remembers the _last_ one ad it's not really
worth parsing the HTTP headers in tweeper just for this rare scenario.

Reported-by: Torsten Grote
tweeper.php