rack-mail_exception 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. data/.document +5 -0
  2. data/.gitignore +22 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +38 -0
  5. data/Rakefile +56 -0
  6. data/VERSION +1 -0
  7. data/lib/rack/mail_exception.rb +103 -0
  8. data/test/helper.rb +13 -0
  9. data/test/test_rack_mail_exception.rb +93 -0
  10. data/vendor/mail/.bundle/config +2 -0
  11. data/vendor/mail/CHANGELOG.rdoc +370 -0
  12. data/vendor/mail/Dependencies.txt +3 -0
  13. data/vendor/mail/Gemfile +17 -0
  14. data/vendor/mail/README.rdoc +572 -0
  15. data/vendor/mail/ROADMAP +92 -0
  16. data/vendor/mail/Rakefile +41 -0
  17. data/vendor/mail/TODO.rdoc +9 -0
  18. data/vendor/mail/lib/mail.rb +76 -0
  19. data/vendor/mail/lib/mail/attachments_list.rb +99 -0
  20. data/vendor/mail/lib/mail/body.rb +287 -0
  21. data/vendor/mail/lib/mail/configuration.rb +67 -0
  22. data/vendor/mail/lib/mail/core_extensions/blank.rb +26 -0
  23. data/vendor/mail/lib/mail/core_extensions/nil.rb +11 -0
  24. data/vendor/mail/lib/mail/core_extensions/string.rb +27 -0
  25. data/vendor/mail/lib/mail/elements.rb +14 -0
  26. data/vendor/mail/lib/mail/elements/address.rb +306 -0
  27. data/vendor/mail/lib/mail/elements/address_list.rb +74 -0
  28. data/vendor/mail/lib/mail/elements/content_disposition_element.rb +30 -0
  29. data/vendor/mail/lib/mail/elements/content_location_element.rb +25 -0
  30. data/vendor/mail/lib/mail/elements/content_transfer_encoding_element.rb +24 -0
  31. data/vendor/mail/lib/mail/elements/content_type_element.rb +35 -0
  32. data/vendor/mail/lib/mail/elements/date_time_element.rb +26 -0
  33. data/vendor/mail/lib/mail/elements/envelope_from_element.rb +34 -0
  34. data/vendor/mail/lib/mail/elements/message_ids_element.rb +29 -0
  35. data/vendor/mail/lib/mail/elements/mime_version_element.rb +26 -0
  36. data/vendor/mail/lib/mail/elements/phrase_list.rb +21 -0
  37. data/vendor/mail/lib/mail/elements/received_element.rb +30 -0
  38. data/vendor/mail/lib/mail/encodings.rb +258 -0
  39. data/vendor/mail/lib/mail/encodings/7bit.rb +31 -0
  40. data/vendor/mail/lib/mail/encodings/8bit.rb +31 -0
  41. data/vendor/mail/lib/mail/encodings/base64.rb +33 -0
  42. data/vendor/mail/lib/mail/encodings/binary.rb +31 -0
  43. data/vendor/mail/lib/mail/encodings/quoted_printable.rb +38 -0
  44. data/vendor/mail/lib/mail/encodings/transfer_encoding.rb +58 -0
  45. data/vendor/mail/lib/mail/envelope.rb +35 -0
  46. data/vendor/mail/lib/mail/field.rb +223 -0
  47. data/vendor/mail/lib/mail/field_list.rb +33 -0
  48. data/vendor/mail/lib/mail/fields.rb +35 -0
  49. data/vendor/mail/lib/mail/fields/bcc_field.rb +56 -0
  50. data/vendor/mail/lib/mail/fields/cc_field.rb +55 -0
  51. data/vendor/mail/lib/mail/fields/comments_field.rb +41 -0
  52. data/vendor/mail/lib/mail/fields/common/address_container.rb +16 -0
  53. data/vendor/mail/lib/mail/fields/common/common_address.rb +125 -0
  54. data/vendor/mail/lib/mail/fields/common/common_date.rb +42 -0
  55. data/vendor/mail/lib/mail/fields/common/common_field.rb +50 -0
  56. data/vendor/mail/lib/mail/fields/common/common_message_id.rb +43 -0
  57. data/vendor/mail/lib/mail/fields/common/parameter_hash.rb +52 -0
  58. data/vendor/mail/lib/mail/fields/content_description_field.rb +19 -0
  59. data/vendor/mail/lib/mail/fields/content_disposition_field.rb +69 -0
  60. data/vendor/mail/lib/mail/fields/content_id_field.rb +63 -0
  61. data/vendor/mail/lib/mail/fields/content_location_field.rb +42 -0
  62. data/vendor/mail/lib/mail/fields/content_transfer_encoding_field.rb +50 -0
  63. data/vendor/mail/lib/mail/fields/content_type_field.rb +185 -0
  64. data/vendor/mail/lib/mail/fields/date_field.rb +55 -0
  65. data/vendor/mail/lib/mail/fields/from_field.rb +55 -0
  66. data/vendor/mail/lib/mail/fields/in_reply_to_field.rb +55 -0
  67. data/vendor/mail/lib/mail/fields/keywords_field.rb +44 -0
  68. data/vendor/mail/lib/mail/fields/message_id_field.rb +83 -0
  69. data/vendor/mail/lib/mail/fields/mime_version_field.rb +53 -0
  70. data/vendor/mail/lib/mail/fields/optional_field.rb +13 -0
  71. data/vendor/mail/lib/mail/fields/received_field.rb +67 -0
  72. data/vendor/mail/lib/mail/fields/references_field.rb +55 -0
  73. data/vendor/mail/lib/mail/fields/reply_to_field.rb +55 -0
  74. data/vendor/mail/lib/mail/fields/resent_bcc_field.rb +55 -0
  75. data/vendor/mail/lib/mail/fields/resent_cc_field.rb +55 -0
  76. data/vendor/mail/lib/mail/fields/resent_date_field.rb +35 -0
  77. data/vendor/mail/lib/mail/fields/resent_from_field.rb +55 -0
  78. data/vendor/mail/lib/mail/fields/resent_message_id_field.rb +34 -0
  79. data/vendor/mail/lib/mail/fields/resent_sender_field.rb +62 -0
  80. data/vendor/mail/lib/mail/fields/resent_to_field.rb +55 -0
  81. data/vendor/mail/lib/mail/fields/return_path_field.rb +64 -0
  82. data/vendor/mail/lib/mail/fields/sender_field.rb +67 -0
  83. data/vendor/mail/lib/mail/fields/structured_field.rb +51 -0
  84. data/vendor/mail/lib/mail/fields/subject_field.rb +16 -0
  85. data/vendor/mail/lib/mail/fields/to_field.rb +55 -0
  86. data/vendor/mail/lib/mail/fields/unstructured_field.rb +166 -0
  87. data/vendor/mail/lib/mail/header.rb +262 -0
  88. data/vendor/mail/lib/mail/mail.rb +234 -0
  89. data/vendor/mail/lib/mail/message.rb +1867 -0
  90. data/vendor/mail/lib/mail/network.rb +9 -0
  91. data/vendor/mail/lib/mail/network/delivery_methods/file_delivery.rb +40 -0
  92. data/vendor/mail/lib/mail/network/delivery_methods/sendmail.rb +62 -0
  93. data/vendor/mail/lib/mail/network/delivery_methods/smtp.rb +110 -0
  94. data/vendor/mail/lib/mail/network/delivery_methods/test_mailer.rb +40 -0
  95. data/vendor/mail/lib/mail/network/retriever_methods/imap.rb +18 -0
  96. data/vendor/mail/lib/mail/network/retriever_methods/pop3.rb +149 -0
  97. data/vendor/mail/lib/mail/parsers/address_lists.rb +64 -0
  98. data/vendor/mail/lib/mail/parsers/address_lists.treetop +19 -0
  99. data/vendor/mail/lib/mail/parsers/content_disposition.rb +387 -0
  100. data/vendor/mail/lib/mail/parsers/content_disposition.treetop +46 -0
  101. data/vendor/mail/lib/mail/parsers/content_location.rb +139 -0
  102. data/vendor/mail/lib/mail/parsers/content_location.treetop +20 -0
  103. data/vendor/mail/lib/mail/parsers/content_transfer_encoding.rb +162 -0
  104. data/vendor/mail/lib/mail/parsers/content_transfer_encoding.treetop +20 -0
  105. data/vendor/mail/lib/mail/parsers/content_type.rb +539 -0
  106. data/vendor/mail/lib/mail/parsers/content_type.treetop +58 -0
  107. data/vendor/mail/lib/mail/parsers/date_time.rb +114 -0
  108. data/vendor/mail/lib/mail/parsers/date_time.treetop +11 -0
  109. data/vendor/mail/lib/mail/parsers/envelope_from.rb +194 -0
  110. data/vendor/mail/lib/mail/parsers/envelope_from.treetop +32 -0
  111. data/vendor/mail/lib/mail/parsers/message_ids.rb +45 -0
  112. data/vendor/mail/lib/mail/parsers/message_ids.treetop +15 -0
  113. data/vendor/mail/lib/mail/parsers/mime_version.rb +144 -0
  114. data/vendor/mail/lib/mail/parsers/mime_version.treetop +19 -0
  115. data/vendor/mail/lib/mail/parsers/phrase_lists.rb +45 -0
  116. data/vendor/mail/lib/mail/parsers/phrase_lists.treetop +15 -0
  117. data/vendor/mail/lib/mail/parsers/received.rb +71 -0
  118. data/vendor/mail/lib/mail/parsers/received.treetop +11 -0
  119. data/vendor/mail/lib/mail/parsers/rfc2045.rb +464 -0
  120. data/vendor/mail/lib/mail/parsers/rfc2045.treetop +36 -0
  121. data/vendor/mail/lib/mail/parsers/rfc2822.rb +5318 -0
  122. data/vendor/mail/lib/mail/parsers/rfc2822.treetop +410 -0
  123. data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.rb +3757 -0
  124. data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.treetop +241 -0
  125. data/vendor/mail/lib/mail/part.rb +102 -0
  126. data/vendor/mail/lib/mail/parts_list.rb +34 -0
  127. data/vendor/mail/lib/mail/patterns.rb +30 -0
  128. data/vendor/mail/lib/mail/utilities.rb +181 -0
  129. data/vendor/mail/lib/mail/version.rb +10 -0
  130. data/vendor/mail/lib/mail/version_specific/ruby_1_8.rb +97 -0
  131. data/vendor/mail/lib/mail/version_specific/ruby_1_9.rb +87 -0
  132. data/vendor/mail/lib/tasks/corpus.rake +125 -0
  133. data/vendor/mail/lib/tasks/treetop.rake +10 -0
  134. data/vendor/mail/mail.gemspec +20 -0
  135. data/vendor/mail/reference/US ASCII Table.txt +130 -0
  136. data/vendor/mail/reference/rfc1035 Domain Implementation and Specification.txt +3083 -0
  137. data/vendor/mail/reference/rfc1049 Content-Type Header Field for Internet Messages.txt +451 -0
  138. data/vendor/mail/reference/rfc1344 Implications of MIME for Internet Mail Gateways.txt +586 -0
  139. data/vendor/mail/reference/rfc1345 Character Mnemonics & Character Sets.txt +5761 -0
  140. data/vendor/mail/reference/rfc1524 A User Agent Configuration Mechanism For Multimedia Mail Format Information.txt +675 -0
  141. data/vendor/mail/reference/rfc1652 SMTP Service Extension for 8bit-MIMEtransport.txt +339 -0
  142. data/vendor/mail/reference/rfc1892 Multipart Report .txt +227 -0
  143. data/vendor/mail/reference/rfc1893 Mail System Status Codes.txt +843 -0
  144. data/vendor/mail/reference/rfc2045 Multipurpose Internet Mail Extensions (1).txt +1739 -0
  145. data/vendor/mail/reference/rfc2046 Multipurpose Internet Mail Extensions (2).txt +2467 -0
  146. data/vendor/mail/reference/rfc2047 Multipurpose Internet Mail Extensions (3).txt +843 -0
  147. data/vendor/mail/reference/rfc2048 Multipurpose Internet Mail Extensions (4).txt +1180 -0
  148. data/vendor/mail/reference/rfc2049 Multipurpose Internet Mail Extensions (5).txt +1347 -0
  149. data/vendor/mail/reference/rfc2111 Content-ID and Message-ID URLs.txt +283 -0
  150. data/vendor/mail/reference/rfc2183 Content-Disposition Header Field.txt +675 -0
  151. data/vendor/mail/reference/rfc2231 MIME Parameter Value and Encoded Word Extensions.txt +563 -0
  152. data/vendor/mail/reference/rfc2387 MIME Multipart-Related Content-type.txt +563 -0
  153. data/vendor/mail/reference/rfc2821 Simple Mail Transfer Protocol.txt +3711 -0
  154. data/vendor/mail/reference/rfc2822 Internet Message Format.txt +2859 -0
  155. data/vendor/mail/reference/rfc3462 Reporting of Mail System Administrative Messages.txt +396 -0
  156. data/vendor/mail/reference/rfc3696 Checking and Transformation of Names.txt +898 -0
  157. data/vendor/mail/reference/rfc4155 The application-mbox Media Type.txt +502 -0
  158. data/vendor/mail/reference/rfc4234 Augmented BNF for Syntax Specifications: ABNF.txt +899 -0
  159. data/vendor/mail/reference/rfc822 Standard for the Format of ARPA Internet Text Messages.txt +2900 -0
  160. data/vendor/mail/spec/environment.rb +15 -0
  161. data/vendor/mail/spec/features/making_a_new_message.feature +14 -0
  162. data/vendor/mail/spec/features/steps/env.rb +6 -0
  163. data/vendor/mail/spec/features/steps/making_a_new_message_steps.rb +11 -0
  164. data/vendor/mail/spec/fixtures/attachments/basic_email.eml +31 -0
  165. data/vendor/mail/spec/fixtures/attachments/test.gif +0 -0
  166. data/vendor/mail/spec/fixtures/attachments/test.jpg +0 -0
  167. data/vendor/mail/spec/fixtures/attachments/test.pdf +0 -0
  168. data/vendor/mail/spec/fixtures/attachments/test.png +0 -0
  169. data/vendor/mail/spec/fixtures/attachments/test.tiff +0 -0
  170. data/vendor/mail/spec/fixtures/attachments/test.zip +0 -0
  171. data/vendor/mail/spec/fixtures/attachments//343/201/246/343/201/231/343/201/250.txt +2 -0
  172. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_disposition.eml +29 -0
  173. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_location.eml +32 -0
  174. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_message_rfc822.eml +92 -0
  175. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_only_email.eml +17 -0
  176. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_pdf.eml +70 -0
  177. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_encoded_name.eml +47 -0
  178. data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_quoted_filename.eml +60 -0
  179. data/vendor/mail/spec/fixtures/emails/error_emails/cant_parse_from.eml +33 -0
  180. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_7-bit.eml +231 -0
  181. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_empty.eml +33 -0
  182. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_plain.eml +148 -0
  183. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_qp_with_space.eml +53 -0
  184. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_spam.eml +44 -0
  185. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_text-html.eml +50 -0
  186. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_8bits.eml +770 -0
  187. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_semi_colon.eml +269 -0
  188. data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_x_uuencode.eml +79 -0
  189. data/vendor/mail/spec/fixtures/emails/error_emails/empty_group_lists.eml +162 -0
  190. data/vendor/mail/spec/fixtures/emails/error_emails/header_fields_with_empty_values.eml +33 -0
  191. data/vendor/mail/spec/fixtures/emails/error_emails/missing_body.eml +16 -0
  192. data/vendor/mail/spec/fixtures/emails/error_emails/missing_content_disposition.eml +43 -0
  193. data/vendor/mail/spec/fixtures/emails/error_emails/multiple_content_types.eml +25 -0
  194. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email11.eml +34 -0
  195. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email12.eml +32 -0
  196. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email2.eml +114 -0
  197. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email4.eml +59 -0
  198. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email7.eml +66 -0
  199. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_encoded_stack_level_too_deep.eml +53 -0
  200. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_illegal_boundary.eml +58 -0
  201. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_mimepart_without_content_type.eml +94 -0
  202. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_multipart_mixed_quoted_boundary.eml +50 -0
  203. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_nested_attachment.eml +100 -0
  204. data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_quoted_illegal_boundary.eml +58 -0
  205. data/vendor/mail/spec/fixtures/emails/mime_emails/sig_only_email.eml +29 -0
  206. data/vendor/mail/spec/fixtures/emails/mime_emails/two_from_in_message.eml +42 -0
  207. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese.eml +9 -0
  208. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment.eml +27 -0
  209. data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment_long_name.eml +44 -0
  210. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce1.eml +179 -0
  211. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce2.eml +179 -0
  212. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_422.eml +98 -0
  213. data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_530.eml +97 -0
  214. data/vendor/mail/spec/fixtures/emails/plain_emails/basic_email.eml +31 -0
  215. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email.eml +14 -0
  216. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email10.eml +20 -0
  217. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email5.eml +19 -0
  218. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email6.eml +20 -0
  219. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email8.eml +47 -0
  220. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_bad_time.eml +62 -0
  221. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_double_at_in_header.eml +14 -0
  222. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_incorrect_header.eml +28 -0
  223. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_multiple_from.eml +30 -0
  224. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_quoted_with_0d0a.eml +14 -0
  225. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_reply.eml +32 -0
  226. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_simple.eml +11 -0
  227. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_string_in_date_field.eml +17 -0
  228. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_trailing_dot.eml +21 -0
  229. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_bad_date.eml +48 -0
  230. data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_partially_quoted_subject.eml +14 -0
  231. data/vendor/mail/spec/fixtures/emails/rfc2822/example01.eml +8 -0
  232. data/vendor/mail/spec/fixtures/emails/rfc2822/example02.eml +9 -0
  233. data/vendor/mail/spec/fixtures/emails/rfc2822/example03.eml +7 -0
  234. data/vendor/mail/spec/fixtures/emails/rfc2822/example04.eml +7 -0
  235. data/vendor/mail/spec/fixtures/emails/rfc2822/example05.eml +8 -0
  236. data/vendor/mail/spec/fixtures/emails/rfc2822/example06.eml +10 -0
  237. data/vendor/mail/spec/fixtures/emails/rfc2822/example07.eml +9 -0
  238. data/vendor/mail/spec/fixtures/emails/rfc2822/example08.eml +12 -0
  239. data/vendor/mail/spec/fixtures/emails/rfc2822/example09.eml +15 -0
  240. data/vendor/mail/spec/fixtures/emails/rfc2822/example10.eml +15 -0
  241. data/vendor/mail/spec/fixtures/emails/rfc2822/example11.eml +6 -0
  242. data/vendor/mail/spec/fixtures/emails/rfc2822/example12.eml +8 -0
  243. data/vendor/mail/spec/fixtures/emails/rfc2822/example13.eml +10 -0
  244. data/vendor/mail/spec/fixtures/emails/sample_output_multipart +0 -0
  245. data/vendor/mail/spec/mail/attachments_list_spec.rb +214 -0
  246. data/vendor/mail/spec/mail/body_spec.rb +385 -0
  247. data/vendor/mail/spec/mail/configuration_spec.rb +19 -0
  248. data/vendor/mail/spec/mail/core_extensions/string_spec.rb +62 -0
  249. data/vendor/mail/spec/mail/core_extensions_spec.rb +99 -0
  250. data/vendor/mail/spec/mail/elements/address_list_spec.rb +109 -0
  251. data/vendor/mail/spec/mail/elements/address_spec.rb +609 -0
  252. data/vendor/mail/spec/mail/elements/date_time_element_spec.rb +20 -0
  253. data/vendor/mail/spec/mail/elements/envelope_from_element_spec.rb +31 -0
  254. data/vendor/mail/spec/mail/elements/message_ids_element_spec.rb +43 -0
  255. data/vendor/mail/spec/mail/elements/phrase_list_spec.rb +22 -0
  256. data/vendor/mail/spec/mail/elements/received_element_spec.rb +34 -0
  257. data/vendor/mail/spec/mail/encoding_spec.rb +189 -0
  258. data/vendor/mail/spec/mail/encodings/base64_spec.rb +25 -0
  259. data/vendor/mail/spec/mail/encodings/quoted_printable_spec.rb +25 -0
  260. data/vendor/mail/spec/mail/encodings_spec.rb +664 -0
  261. data/vendor/mail/spec/mail/example_emails_spec.rb +303 -0
  262. data/vendor/mail/spec/mail/field_list_spec.rb +33 -0
  263. data/vendor/mail/spec/mail/field_spec.rb +198 -0
  264. data/vendor/mail/spec/mail/fields/bcc_field_spec.rb +89 -0
  265. data/vendor/mail/spec/mail/fields/cc_field_spec.rb +79 -0
  266. data/vendor/mail/spec/mail/fields/comments_field_spec.rb +25 -0
  267. data/vendor/mail/spec/mail/fields/common/address_container_spec.rb +18 -0
  268. data/vendor/mail/spec/mail/fields/common/common_address_spec.rb +132 -0
  269. data/vendor/mail/spec/mail/fields/common/common_date_spec.rb +25 -0
  270. data/vendor/mail/spec/mail/fields/common/common_field_spec.rb +69 -0
  271. data/vendor/mail/spec/mail/fields/common/common_message_id_spec.rb +30 -0
  272. data/vendor/mail/spec/mail/fields/common/parameter_hash_spec.rb +56 -0
  273. data/vendor/mail/spec/mail/fields/content_description_field_spec.rb +39 -0
  274. data/vendor/mail/spec/mail/fields/content_disposition_field_spec.rb +55 -0
  275. data/vendor/mail/spec/mail/fields/content_id_field_spec.rb +117 -0
  276. data/vendor/mail/spec/mail/fields/content_location_field_spec.rb +46 -0
  277. data/vendor/mail/spec/mail/fields/content_transfer_encoding_field_spec.rb +113 -0
  278. data/vendor/mail/spec/mail/fields/content_type_field_spec.rb +678 -0
  279. data/vendor/mail/spec/mail/fields/date_field_spec.rb +73 -0
  280. data/vendor/mail/spec/mail/fields/envelope_spec.rb +48 -0
  281. data/vendor/mail/spec/mail/fields/from_field_spec.rb +89 -0
  282. data/vendor/mail/spec/mail/fields/in_reply_to_field_spec.rb +62 -0
  283. data/vendor/mail/spec/mail/fields/keywords_field_spec.rb +66 -0
  284. data/vendor/mail/spec/mail/fields/message_id_field_spec.rb +147 -0
  285. data/vendor/mail/spec/mail/fields/mime_version_field_spec.rb +166 -0
  286. data/vendor/mail/spec/mail/fields/received_field_spec.rb +44 -0
  287. data/vendor/mail/spec/mail/fields/references_field_spec.rb +35 -0
  288. data/vendor/mail/spec/mail/fields/reply_to_field_spec.rb +67 -0
  289. data/vendor/mail/spec/mail/fields/resent_bcc_field_spec.rb +66 -0
  290. data/vendor/mail/spec/mail/fields/resent_cc_field_spec.rb +66 -0
  291. data/vendor/mail/spec/mail/fields/resent_date_field_spec.rb +39 -0
  292. data/vendor/mail/spec/mail/fields/resent_from_field_spec.rb +66 -0
  293. data/vendor/mail/spec/mail/fields/resent_message_id_field_spec.rb +24 -0
  294. data/vendor/mail/spec/mail/fields/resent_sender_field_spec.rb +58 -0
  295. data/vendor/mail/spec/mail/fields/resent_to_field_spec.rb +66 -0
  296. data/vendor/mail/spec/mail/fields/return_path_field_spec.rb +52 -0
  297. data/vendor/mail/spec/mail/fields/sender_field_spec.rb +58 -0
  298. data/vendor/mail/spec/mail/fields/structured_field_spec.rb +72 -0
  299. data/vendor/mail/spec/mail/fields/to_field_spec.rb +92 -0
  300. data/vendor/mail/spec/mail/fields/unstructured_field_spec.rb +134 -0
  301. data/vendor/mail/spec/mail/header_spec.rb +578 -0
  302. data/vendor/mail/spec/mail/mail_spec.rb +34 -0
  303. data/vendor/mail/spec/mail/message_spec.rb +1409 -0
  304. data/vendor/mail/spec/mail/mime_messages_spec.rb +435 -0
  305. data/vendor/mail/spec/mail/multipart_report_spec.rb +112 -0
  306. data/vendor/mail/spec/mail/network/delivery_methods/file_delivery_spec.rb +79 -0
  307. data/vendor/mail/spec/mail/network/delivery_methods/sendmail_spec.rb +125 -0
  308. data/vendor/mail/spec/mail/network/delivery_methods/smtp_spec.rb +133 -0
  309. data/vendor/mail/spec/mail/network/delivery_methods/test_mailer_spec.rb +57 -0
  310. data/vendor/mail/spec/mail/network/retriever_methods/pop3_spec.rb +180 -0
  311. data/vendor/mail/spec/mail/network_spec.rb +359 -0
  312. data/vendor/mail/spec/mail/parsers/address_lists_parser_spec.rb +15 -0
  313. data/vendor/mail/spec/mail/parsers/content_transfer_encoding_parser_spec.rb +72 -0
  314. data/vendor/mail/spec/mail/part_spec.rb +129 -0
  315. data/vendor/mail/spec/mail/parts_list_spec.rb +12 -0
  316. data/vendor/mail/spec/mail/round_tripping_spec.rb +44 -0
  317. data/vendor/mail/spec/mail/utilities_spec.rb +327 -0
  318. data/vendor/mail/spec/mail/version_specific/escape_paren_1_8_spec.rb +32 -0
  319. data/vendor/mail/spec/matchers/break_down_to.rb +35 -0
  320. data/vendor/mail/spec/spec_helper.rb +163 -0
  321. metadata +442 -0
@@ -0,0 +1,283 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+ Network Working Group E. Levinson
8
+ Request for Comments: 2111 XIson, Inc.
9
+ Category: Standards Track March 1997
10
+
11
+
12
+ Content-ID and Message-ID Uniform Resource Locators
13
+
14
+ Status of this Memo
15
+
16
+ This document specifies an Internet standards track protocol for the
17
+ Internet community, and requests discussion and suggestions for
18
+ improvements. Please refer to the current edition of the "Internet
19
+ Official Protocol Standards" (STD 1) for the standardization state
20
+ and status of this protocol. Distribution of this memo is unlimited.
21
+
22
+ Abstract
23
+
24
+ The Uniform Resource Locator (URL) schemes, "cid:" and "mid:" allow
25
+ references to messages and the body parts of messages. For example,
26
+ within a single multipart message, one HTML body part might include
27
+ embedded references to other parts of the same message.
28
+
29
+ 1. Introduction
30
+
31
+ The use of [MIME] within email to convey Web pages and their
32
+ associated images requires a URL scheme to permit the HTML to refer
33
+ to the images or other data included in the message. The Content-ID
34
+ Uniform Resource Locator, "cid:", serves that purpose.
35
+
36
+ Similarly Net News readers use Message-IDs to link related messages
37
+ together. The Message-ID URL provides a scheme, "mid:", to refer to
38
+ such messages as a "resource".
39
+
40
+ The "mid" (Message-ID) and "cid" (Content-ID) URL schemes provide
41
+ identifiers for messages and their body parts. The "mid" scheme uses
42
+ (a part of) the message-id of an email message to refer to a specific
43
+ message. The "cid" scheme refers to a specific body part of a
44
+ message; its use is generally limited to references to other body
45
+ parts in the same message as the referring body part. The "mid"
46
+ scheme may also refer to a specific body part within a designated
47
+ message, by including the content-ID's address.
48
+
49
+ A note on terminology. The terms "body part" and "MIME entity" are
50
+ used interchangeably. They refer to the headers and body of a MIME
51
+ message, either the message itself or one of the body parts contained
52
+ in a Multipart message.
53
+
54
+
55
+
56
+
57
+
58
+ Levinson Standards Track [Page 1]
59
+
60
+ RFC 2111 CID and MID URLs March 1997
61
+
62
+
63
+ 2. The MID and CID URL Schemes
64
+
65
+ RFC1738 [URL] reserves the "mid" and "cid" schemes for Message-ID and
66
+ Content-ID respectively. This memorandum defines the syntax for
67
+ those URLs. Because they use the same syntactic elements they are
68
+ presented together.
69
+
70
+ The URLs take the form
71
+
72
+ content-id = url-addr-spec
73
+
74
+ message-id = url-addr-spec
75
+
76
+ url-addr-spec = addr-spec ; URL encoding of RFC 822 addr-spec
77
+
78
+ cid-url = "cid" ":" content-id
79
+
80
+ mid-url = "mid" ":" message-id [ "/" content-id ]
81
+
82
+ Note: in Internet mail messages, the addr-spec in a Content-ID
83
+ [MIME] or Message-ID [822] header are enclosed in angle brackets
84
+ (<>). Since addr-spec in a Message-ID or Content-ID might contain
85
+ characters not allowed within a URL; any such character (including
86
+ "/", which is reserved within the "mid" scheme) must be hex-
87
+ encoded using the %hh escape mechanism in [URL].
88
+
89
+ A "mid" URL with only a "message-id" refers to an entire message.
90
+ With the appended "content-id", it refers to a body part within a
91
+ message, as does a "cid" URL. The Content-ID of a MIME body part is
92
+ required to be globally unique. However, in many systems that store
93
+ messages, body parts are not indexed independently their context
94
+ (message). The "mid" URL long form was designed to supply the
95
+ context needed to support interoperability with such systems.
96
+
97
+ A implementation conforming to this specification is required to
98
+ support the "mid" URL long form (message-id/content-id). Conforming
99
+ implementations can choose to, but are not required to, take
100
+ advantage of the content-id's uniqueness and interpret a "cid" URL to
101
+ refer to any body part within the message store.
102
+
103
+ In limited circumstances (e.g., within multipart/alternate), a single
104
+ message may contain several body parts that have the same Content-ID.
105
+ That occurs, for example, when identical data can be accessed through
106
+ different methods [MIME, sect. 7.2.3]. In those cases, conforming
107
+ implementations are required to use the rules of the containing MIME
108
+ entity (e.g., multi-part/alternate) to select the body part to which
109
+ the Content-ID refers.
110
+
111
+
112
+
113
+
114
+ Levinson Standards Track [Page 2]
115
+
116
+ RFC 2111 CID and MID URLs March 1997
117
+
118
+
119
+ A "cid" URL is converted to the corresponding Content-ID message
120
+ header [MIME] by removing the "cid:" prefix, converting %hh hex-
121
+ escaped characters to their ASCII equivalents and enclosing the
122
+ remaining parts with an angle bracket pair, "<" and ">". For
123
+ example, "mid:foo4%25foo1@bar.net" corresponds to
124
+
125
+ Message-ID: <foo4%foo1@bar.net>
126
+
127
+ A "mid" URL is converted to a Message-ID or Message-ID/Content-ID
128
+ pair in a similar fashion.
129
+
130
+ Both message-id and content-id are required to be globally unique.
131
+ That is, no two different messages will ever have the same Message-ID
132
+ addr-spec; no different body parts will ever have the same Content-ID
133
+ addr-spec. A common technique used by many message systems is to use
134
+ a time and date stamp along with the local host's domain name, e.g.,
135
+ 950124.162336@XIson.com.
136
+
137
+ Some Examples
138
+
139
+ The following message contains an HTML body part that refers to an
140
+ image contained in another body part. Both body parts are contained
141
+ in a Multipart/Related MIME entity. The HTML IMG tag contains a
142
+ cidurl which points to the image.
143
+
144
+ From: foo1@bar.net
145
+ To: foo2@bar.net
146
+ Subject: A simple example
147
+ Mime-Version: 1.0
148
+ Content-Type: multipart/related; boundary="boundary-example-1";
149
+ type=Text/HTML
150
+
151
+ --boundary-example 1
152
+ Content-Type: Text/HTML; charset=US-ASCII
153
+
154
+ ... text of the HTML document, which might contain a hyperlink
155
+ to the other body part, for example through a statement such as:
156
+ <IMG SRC="cid:foo4*foo1@bar.net" ALT="IETF logo">
157
+
158
+ --boundary-example-1
159
+ Content-ID: foo4*foo1@bar.net
160
+ Content-Type: IMAGE/GIF
161
+ Content-Transfer-Encoding: BASE64
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+ Levinson Standards Track [Page 3]
171
+
172
+ RFC 2111 CID and MID URLs March 1997
173
+
174
+
175
+ R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
176
+ NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
177
+ etc...
178
+
179
+ --boundary-example-1--
180
+
181
+ The following message points to another message (hopefully still in
182
+ the recipient's message store).
183
+
184
+ From: bar@none.com
185
+ To: phooey@all.com
186
+ Subject: Here's how to do it
187
+ Content-type: text/html; charset=usascii
188
+
189
+ ... The items in my
190
+ <A HREF= "mid:960830.1639@XIson.com/partA.960830.1639@XIson.com">
191
+ previous message</A>, shows how the approach you propose can be
192
+ used to accomplish ...
193
+
194
+ 3. Security Considerations
195
+
196
+ The URLs defined here provide an addressing or referencing mechanism.
197
+ The values of these URLs disclose no more about the originators
198
+ environment than the corresponding Message-ID and Content-ID values.
199
+ Where concern exists about such disclosures the originator of a
200
+ message using mid and cid URLs must take precautions to insure that
201
+ confidential information is not disclosed. Those precautions should
202
+ already be in place to handle existing mail use of the Message-ID and
203
+ Content-ID.
204
+
205
+ 4. References
206
+
207
+ [822] Crocker, D., "Standard for the Format of ARPA Internet Text
208
+ Messages," August 1982, University of Delaware, STD 11, RFC
209
+ 822.
210
+
211
+ [MIME] N. Borenstein, N. Freed, "MIME (Multipurpose Internet Mail
212
+ Extensions) Part One: Mechanisms for Specifying and
213
+ Describing the Format of Internet Message Bodies,"
214
+ September 1993, RFC 1521.
215
+
216
+ [URL] Berners-Lee, T., Masinter, L., and McCahill, M., "Uniform
217
+ Resource Locators (URL)," December 1994.
218
+
219
+ [MULREL] E. Levinson, "The MIME Multipart/Related Content-type,"
220
+ December 1995, RFC 1874.
221
+
222
+
223
+
224
+
225
+
226
+ Levinson Standards Track [Page 4]
227
+
228
+ RFC 2111 CID and MID URLs March 1997
229
+
230
+
231
+ 5. Acknowledgments
232
+
233
+ The original concept of "mid" and "cid" URLs were part of the Tim
234
+ Berners-Lee's original vision of the World Wide Web. The ideas and
235
+ design have benefited greatly by discussions with Harald Alvestrand,
236
+ Dan Connolly, Roy Fielding, Larry Masinter, Jacob Palme, and others
237
+ in the MHTML working group.
238
+
239
+ 6. Author's Address
240
+
241
+ Edward Levinson
242
+ 47 Clive Street
243
+ Metuchen, NJ 08840-1060
244
+ USA
245
+ +1 908 549 3716
246
+ <XIson@cnj.digex.net>
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+ Levinson Standards Track [Page 5]
283
+
@@ -0,0 +1,675 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+ Network Working Group R. Troost
8
+ Request for Comments: 2183 New Century Systems
9
+ Updates: 1806 S. Dorner
10
+ Category: Standards Track QUALCOMM Incorporated
11
+ K. Moore, Editor
12
+ University of Tennessee
13
+ August 1997
14
+
15
+
16
+ Communicating Presentation Information in
17
+ Internet Messages:
18
+ The Content-Disposition Header Field
19
+
20
+ Status of this Memo
21
+
22
+ This document specifies an Internet standards track protocol for the
23
+ Internet community, and requests discussion and suggestions for
24
+ improvements. Please refer to the current edition of the "Internet
25
+ Official Protocol Standards" (STD 1) for the standardization state
26
+ and status of this protocol. Distribution of this memo is unlimited.
27
+
28
+ Abstract
29
+
30
+ This memo provides a mechanism whereby messages conforming to the
31
+ MIME specifications [RFC 2045, RFC 2046, RFC 2047, RFC 2048, RFC
32
+ 2049] can convey presentational information. It specifies the
33
+ "Content-Disposition" header field, which is optional and valid for
34
+ any MIME entity ("message" or "body part"). Two values for this
35
+ header field are described in this memo; one for the ordinary linear
36
+ presentation of the body part, and another to facilitate the use of
37
+ mail to transfer files. It is expected that more values will be
38
+ defined in the future, and procedures are defined for extending this
39
+ set of values.
40
+
41
+ This document is intended as an extension to MIME. As such, the
42
+ reader is assumed to be familiar with the MIME specifications, and
43
+ [RFC 822]. The information presented herein supplements but does not
44
+ replace that found in those documents.
45
+
46
+ This document is a revision to the Experimental protocol defined in
47
+ RFC 1806. As compared to RFC 1806, this document contains minor
48
+ editorial updates, adds new parameters needed to support the File
49
+ Transfer Body Part, and references a separate specification for the
50
+ handling of non-ASCII and/or very long parameter values.
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+ Troost, et. al. Standards Track [Page 1]
59
+
60
+ RFC 2183 Content-Disposition August 1997
61
+
62
+
63
+ 1. Introduction
64
+
65
+ MIME specifies a standard format for encapsulating multiple pieces of
66
+ data into a single Internet message. That document does not address
67
+ the issue of presentation styles; it provides a framework for the
68
+ interchange of message content, but leaves presentation issues solely
69
+ in the hands of mail user agent (MUA) implementors.
70
+
71
+ Two common ways of presenting multipart electronic messages are as a
72
+ main document with a list of separate attachments, and as a single
73
+ document with the various parts expanded (displayed) inline. The
74
+ display of an attachment is generally construed to require positive
75
+ action on the part of the recipient, while inline message components
76
+ are displayed automatically when the message is viewed. A mechanism
77
+ is needed to allow the sender to transmit this sort of presentational
78
+ information to the recipient; the Content-Disposition header provides
79
+ this mechanism, allowing each component of a message to be tagged
80
+ with an indication of its desired presentation semantics.
81
+
82
+ Tagging messages in this manner will often be sufficient for basic
83
+ message formatting. However, in many cases a more powerful and
84
+ flexible approach will be necessary. The definition of such
85
+ approaches is beyond the scope of this memo; however, such approaches
86
+ can benefit from additional Content-Disposition values and
87
+ parameters, to be defined at a later date.
88
+
89
+ In addition to allowing the sender to specify the presentational
90
+ disposition of a message component, it is desirable to allow her to
91
+ indicate a default archival disposition; a filename. The optional
92
+ "filename" parameter provides for this. Further, the creation-date,
93
+ modification-date, and read-date parameters allow preservation of
94
+ those file attributes when the file is transmitted over MIME email.
95
+
96
+ NB: The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
97
+ SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
98
+ document, are to be interpreted as described in [RFC 2119].
99
+
100
+ 2. The Content-Disposition Header Field
101
+
102
+ Content-Disposition is an optional header field. In its absence, the
103
+ MUA may use whatever presentation method it deems suitable.
104
+
105
+ It is desirable to keep the set of possible disposition types small
106
+ and well defined, to avoid needless complexity. Even so, evolving
107
+ usage will likely require the definition of additional disposition
108
+ types or parameters, so the set of disposition values is extensible;
109
+ see below.
110
+
111
+
112
+
113
+
114
+ Troost, et. al. Standards Track [Page 2]
115
+
116
+ RFC 2183 Content-Disposition August 1997
117
+
118
+
119
+ In the extended BNF notation of [RFC 822], the Content-Disposition
120
+ header field is defined as follows:
121
+
122
+ disposition := "Content-Disposition" ":"
123
+ disposition-type
124
+ *(";" disposition-parm)
125
+
126
+ disposition-type := "inline"
127
+ / "attachment"
128
+ / extension-token
129
+ ; values are not case-sensitive
130
+
131
+ disposition-parm := filename-parm
132
+ / creation-date-parm
133
+ / modification-date-parm
134
+ / read-date-parm
135
+ / size-parm
136
+ / parameter
137
+
138
+ filename-parm := "filename" "=" value
139
+
140
+ creation-date-parm := "creation-date" "=" quoted-date-time
141
+
142
+ modification-date-parm := "modification-date" "=" quoted-date-time
143
+
144
+ read-date-parm := "read-date" "=" quoted-date-time
145
+
146
+ size-parm := "size" "=" 1*DIGIT
147
+
148
+ quoted-date-time := quoted-string
149
+ ; contents MUST be an RFC 822 `date-time'
150
+ ; numeric timezones (+HHMM or -HHMM) MUST be used
151
+
152
+
153
+
154
+ NOTE ON PARAMETER VALUE LENGHTS: A short (length <= 78 characters)
155
+ parameter value containing only non-`tspecials' characters SHOULD be
156
+ represented as a single `token'. A short parameter value containing
157
+ only ASCII characters, but including `tspecials' characters, SHOULD
158
+ be represented as `quoted-string'. Parameter values longer than 78
159
+ characters, or which contain non-ASCII characters, MUST be encoded as
160
+ specified in [RFC 2184].
161
+
162
+ `Extension-token', `parameter', `tspecials' and `value' are defined
163
+ according to [RFC 2045] (which references [RFC 822] in the definition
164
+ of some of these tokens). `quoted-string' and `DIGIT' are defined in
165
+ [RFC 822].
166
+
167
+
168
+
169
+
170
+ Troost, et. al. Standards Track [Page 3]
171
+
172
+ RFC 2183 Content-Disposition August 1997
173
+
174
+
175
+ 2.1 The Inline Disposition Type
176
+
177
+ A bodypart should be marked `inline' if it is intended to be
178
+ displayed automatically upon display of the message. Inline
179
+ bodyparts should be presented in the order in which they occur,
180
+ subject to the normal semantics of multipart messages.
181
+
182
+ 2.2 The Attachment Disposition Type
183
+
184
+ Bodyparts can be designated `attachment' to indicate that they are
185
+ separate from the main body of the mail message, and that their
186
+ display should not be automatic, but contingent upon some further
187
+ action of the user. The MUA might instead present the user of a
188
+ bitmap terminal with an iconic representation of the attachments, or,
189
+ on character terminals, with a list of attachments from which the
190
+ user could select for viewing or storage.
191
+
192
+ 2.3 The Filename Parameter
193
+
194
+ The sender may want to suggest a filename to be used if the entity is
195
+ detached and stored in a separate file. If the receiving MUA writes
196
+ the entity to a file, the suggested filename should be used as a
197
+ basis for the actual filename, where possible.
198
+
199
+ It is important that the receiving MUA not blindly use the suggested
200
+ filename. The suggested filename SHOULD be checked (and possibly
201
+ changed) to see that it conforms to local filesystem conventions,
202
+ does not overwrite an existing file, and does not present a security
203
+ problem (see Security Considerations below).
204
+
205
+ The receiving MUA SHOULD NOT respect any directory path information
206
+ that may seem to be present in the filename parameter. The filename
207
+ should be treated as a terminal component only. Portable
208
+ specification of directory paths might possibly be done in the future
209
+ via a separate Content-Disposition parameter, but no provision is
210
+ made for it in this draft.
211
+
212
+ Current [RFC 2045] grammar restricts parameter values (and hence
213
+ Content-Disposition filenames) to US-ASCII. We recognize the great
214
+ desirability of allowing arbitrary character sets in filenames, but
215
+ it is beyond the scope of this document to define the necessary
216
+ mechanisms. We expect that the basic [RFC 1521] `value'
217
+ specification will someday be amended to allow use of non-US-ASCII
218
+ characters, at which time the same mechanism should be used in the
219
+ Content-Disposition filename parameter.
220
+
221
+
222
+
223
+
224
+
225
+
226
+ Troost, et. al. Standards Track [Page 4]
227
+
228
+ RFC 2183 Content-Disposition August 1997
229
+
230
+
231
+ Beyond the limitation to US-ASCII, the sending MUA may wish to bear
232
+ in mind the limitations of common filesystems. Many have severe
233
+ length and character set restrictions. Short alphanumeric filenames
234
+ are least likely to require modification by the receiving system.
235
+
236
+ The presence of the filename parameter does not force an
237
+ implementation to write the entity to a separate file. It is
238
+ perfectly acceptable for implementations to leave the entity as part
239
+ of the normal mail stream unless the user requests otherwise. As a
240
+ consequence, the parameter may be used on any MIME entity, even
241
+ `inline' ones. These will not normally be written to files, but the
242
+ parameter could be used to provide a filename if the receiving user
243
+ should choose to write the part to a file.
244
+
245
+ 2.4 The Creation-Date parameter
246
+
247
+ The creation-date parameter MAY be used to indicate the date at which
248
+ the file was created. If this parameter is included, the paramter
249
+ value MUST be a quoted-string which contains a representation of the
250
+ creation date of the file in [RFC 822] `date-time' format.
251
+
252
+ UNIX and POSIX implementors are cautioned that the `st_ctime' file
253
+ attribute of the `stat' structure is not the creation time of the
254
+ file; it is thus not appropriate as a source for the creation-date
255
+ parameter value.
256
+
257
+ 2.5 The Modification-Date parameter
258
+
259
+ The modification-date parameter MAY be used to indicate the date at
260
+ which the file was last modified. If the modification-date parameter
261
+ is included, the paramter value MUST be a quoted-string which
262
+ contains a representation of the last modification date of the file
263
+ in [RFC 822] `date-time' format.
264
+
265
+ 2.6 The Read-Date parameter
266
+
267
+ The read-date parameter MAY be used to indicate the date at which the
268
+ file was last read. If the read-date parameter is included, the
269
+ parameter value MUST be a quoted-string which contains a
270
+ representation of the last-read date of the file in [RFC 822] `date-
271
+ time' format.
272
+
273
+ 2.7 The Size parameter
274
+
275
+ The size parameter indicates an approximate size of the file in
276
+ octets. It can be used, for example, to pre-allocate space before
277
+ attempting to store the file, or to determine whether enough space
278
+ exists.
279
+
280
+
281
+
282
+ Troost, et. al. Standards Track [Page 5]
283
+
284
+ RFC 2183 Content-Disposition August 1997
285
+
286
+
287
+ 2.8 Future Extensions and Unrecognized Disposition Types
288
+
289
+ In the likely event that new parameters or disposition types are
290
+ needed, they should be registered with the Internet Assigned Numbers
291
+ Authority (IANA), in the manner specified in Section 9 of this memo.
292
+
293
+ Once new disposition types and parameters are defined, there is of
294
+ course the likelihood that implementations will see disposition types
295
+ and parameters they do not understand. Furthermore, since x-tokens
296
+ are allowed, implementations may also see entirely unregistered
297
+ disposition types and parameters.
298
+
299
+ Unrecognized parameters should be ignored. Unrecognized disposition
300
+ types should be treated as `attachment'. The choice of `attachment'
301
+ for unrecognized types is made because a sender who goes to the
302
+ trouble of producing a Content-Disposition header with a new
303
+ disposition type is more likely aiming for something more elaborate
304
+ than inline presentation.
305
+
306
+ Unless noted otherwise in the definition of a parameter, Content-
307
+ Disposition parameters are valid for all dispositions. (In contrast
308
+ to MIME content-type parameters, which are defined on a per-content-
309
+ type basis.) Thus, for example, the `filename' parameter still means
310
+ the name of the file to which the part should be written, even if the
311
+ disposition itself is unrecognized.
312
+
313
+ 2.9 Content-Disposition and Multipart
314
+
315
+ If a Content-Disposition header is used on a multipart body part, it
316
+ applies to the multipart as a whole, not the individual subparts.
317
+ The disposition types of the subparts do not need to be consulted
318
+ until the multipart itself is presented. When the multipart is
319
+ displayed, then the dispositions of the subparts should be respected.
320
+
321
+ If the `inline' disposition is used, the multipart should be
322
+ displayed as normal; however, an `attachment' subpart should require
323
+ action from the user to display.
324
+
325
+ If the `attachment' disposition is used, presentation of the
326
+ multipart should not proceed without explicit user action. Once the
327
+ user has chosen to display the multipart, the individual subpart
328
+ dispositions should be consulted to determine how to present the
329
+ subparts.
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ Troost, et. al. Standards Track [Page 6]
339
+
340
+ RFC 2183 Content-Disposition August 1997
341
+
342
+
343
+ 2.10 Content-Disposition and the Main Message
344
+
345
+ It is permissible to use Content-Disposition on the main body of an
346
+ [RFC 822] message.
347
+
348
+ 3. Examples
349
+
350
+ Here is a an example of a body part containing a JPEG image that is
351
+ intended to be viewed by the user immediately:
352
+
353
+ Content-Type: image/jpeg
354
+ Content-Disposition: inline
355
+ Content-Description: just a small picture of me
356
+
357
+ <jpeg data>
358
+
359
+ The following body part contains a JPEG image that should be
360
+ displayed to the user only if the user requests it. If the JPEG is
361
+ written to a file, the file should be named "genome.jpg". The
362
+ recipient's user might also choose to set the last-modified date of
363
+ the stored file to date in the modification-date parameter:
364
+
365
+ Content-Type: image/jpeg
366
+ Content-Disposition: attachment; filename=genome.jpeg;
367
+ modification-date="Wed, 12 Feb 1997 16:29:51 -0500";
368
+ Content-Description: a complete map of the human genome
369
+
370
+ <jpeg data>
371
+
372
+ The following is an example of the use of the `attachment'
373
+ disposition with a multipart body part. The user should see text-
374
+ part-1 immediately, then take some action to view multipart-2. After
375
+ taking action to view multipart-2, the user will see text-part-2
376
+ right away, and be required to take action to view jpeg-1. Subparts
377
+ are indented for clarity; they would not be so indented in a real
378
+ message.
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+
393
+
394
+ Troost, et. al. Standards Track [Page 7]
395
+
396
+ RFC 2183 Content-Disposition August 1997
397
+
398
+
399
+ Content-Type: multipart/mixed; boundary=outer
400
+ Content-Description: multipart-1
401
+
402
+ --outer
403
+ Content-Type: text/plain
404
+ Content-Disposition: inline
405
+ Content-Description: text-part-1
406
+
407
+ Some text goes here
408
+
409
+ --outer
410
+ Content-Type: multipart/mixed; boundary=inner
411
+ Content-Disposition: attachment
412
+ Content-Description: multipart-2
413
+
414
+ --inner
415
+ Content-Type: text/plain
416
+ Content-Disposition: inline
417
+ Content-Description: text-part-2
418
+
419
+ Some more text here.
420
+
421
+ --inner
422
+ Content-Type: image/jpeg
423
+ Content-Disposition: attachment
424
+ Content-Description: jpeg-1
425
+
426
+ <jpeg data>
427
+ --inner--
428
+ --outer--
429
+
430
+ 4. Summary
431
+
432
+ Content-Disposition takes one of two values, `inline' and
433
+ `attachment'. `Inline' indicates that the entity should be
434
+ immediately displayed to the user, whereas `attachment' means that
435
+ the user should take additional action to view the entity.
436
+
437
+ The `filename' parameter can be used to suggest a filename for
438
+ storing the bodypart, if the user wishes to store it in an external
439
+ file.
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+ Troost, et. al. Standards Track [Page 8]
451
+
452
+ RFC 2183 Content-Disposition August 1997
453
+
454
+
455
+ 5. Security Considerations
456
+
457
+ There are security issues involved any time users exchange data.
458
+ While these are not to be minimized, neither does this memo change
459
+ the status quo in that regard, except in one instance.
460
+
461
+ Since this memo provides a way for the sender to suggest a filename,
462
+ a receiving MUA must take care that the sender's suggested filename
463
+ does not represent a hazard. Using UNIX as an example, some hazards
464
+ would be:
465
+
466
+ + Creating startup files (e.g., ".login").
467
+
468
+ + Creating or overwriting system files (e.g., "/etc/passwd").
469
+
470
+ + Overwriting any existing file.
471
+
472
+ + Placing executable files into any command search path
473
+ (e.g., "~/bin/more").
474
+
475
+ + Sending the file to a pipe (e.g., "| sh").
476
+
477
+ In general, the receiving MUA should not name or place the file such
478
+ that it will get interpreted or executed without the user explicitly
479
+ initiating the action.
480
+
481
+ It is very important to note that this is not an exhaustive list; it
482
+ is intended as a small set of examples only. Implementors must be
483
+ alert to the potential hazards on their target systems.
484
+
485
+ 6. References
486
+
487
+ [RFC 2119]
488
+ Bradner, S., "Key words for use in RFCs to Indicate Requirement
489
+ Levels", RFC 2119, March 1997.
490
+
491
+ [RFC 2184]
492
+ Freed, N. and K. Moore, "MIME Parameter value and Encoded Words:
493
+ Character Sets, Lanaguage, and Continuations", RFC 2184, August
494
+ 1997.
495
+
496
+ [RFC 2045]
497
+ Freed, N. and N. Borenstein, "MIME (Multipurpose Internet Mail
498
+ Extensions) Part One: Format of Internet Message Bodies", RFC
499
+ 2045, December 1996.
500
+
501
+
502
+
503
+
504
+
505
+
506
+ Troost, et. al. Standards Track [Page 9]
507
+
508
+ RFC 2183 Content-Disposition August 1997
509
+
510
+
511
+ [RFC 2046]
512
+ Freed, N. and N. Borenstein, "MIME (Multipurpose Internet Mail
513
+ Extensions) Part Two: Media Types", RFC 2046, December 1996.
514
+
515
+ [RFC 2047]
516
+ Moore, K., "MIME (Multipurpose Internet Mail Extensions) Part
517
+ Three: Message Header Extensions for non-ASCII Text", RFC 2047,
518
+ December 1996.
519
+
520
+ [RFC 2048]
521
+ Freed, N., Klensin, J. and J. Postel, "MIME (Multipurpose
522
+ Internet Mail Extensions) Part Four: Registration Procedures",
523
+ RFC 2048, December 1996.
524
+
525
+ [RFC 2049]
526
+ Freed, N. and N. Borenstein, "MIME (Multipurpose Internet Mail
527
+ Extensions) Part Five: Conformance Criteria and Examples", RFC
528
+ 2049, December 1996.
529
+
530
+ [RFC 822]
531
+ Crocker, D., "Standard for the Format of ARPA Internet Text
532
+ Messages", STD 11, RFC 822, UDEL, August 1982.
533
+
534
+ 7. Acknowledgements
535
+
536
+ We gratefully acknowledge the help these people provided during the
537
+ preparation of this draft:
538
+
539
+ Nathaniel Borenstein
540
+ Ned Freed
541
+ Keith Moore
542
+ Dave Crocker
543
+ Dan Pritchett
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+ Troost, et. al. Standards Track [Page 10]
563
+
564
+ RFC 2183 Content-Disposition August 1997
565
+
566
+
567
+ 8. Authors' Addresses
568
+
569
+ You should blame the editor of this version of the document for any
570
+ changes since RFC 1806:
571
+
572
+ Keith Moore
573
+ Department of Computer Science
574
+ University of Tennessee, Knoxville
575
+ 107 Ayres Hall
576
+ Knoxville TN 37996-1301
577
+ USA
578
+
579
+ Phone: +1 (423) 974-5067
580
+ Fax: +1 (423) 974-8296
581
+ Email: moore@cs.utk.edu
582
+
583
+
584
+ The authors of RFC 1806 are:
585
+
586
+ Rens Troost
587
+ New Century Systems
588
+ 324 East 41st Street #804
589
+ New York, NY, 10017 USA
590
+
591
+ Phone: +1 (212) 557-2050
592
+ Fax: +1 (212) 557-2049
593
+ EMail: rens@century.com
594
+
595
+
596
+ Steve Dorner
597
+ QUALCOMM Incorporated
598
+ 6455 Lusk Boulevard
599
+ San Diego, CA 92121
600
+ USA
601
+
602
+ EMail: sdorner@qualcomm.com
603
+
604
+
605
+ 9. Registration of New Content-Disposition Values and Parameters
606
+
607
+ New Content-Disposition values (besides "inline" and "attachment")
608
+ may be defined only by Internet standards-track documents, or in
609
+ Experimental documents approved by the Internet Engineering Steering
610
+ Group.
611
+
612
+
613
+
614
+
615
+
616
+
617
+
618
+ Troost, et. al. Standards Track [Page 11]
619
+
620
+ RFC 2183 Content-Disposition August 1997
621
+
622
+
623
+ New content-disposition parameters may be registered by supplying the
624
+ information in the following template and sending it via electronic
625
+ mail to IANA@IANA.ORG:
626
+
627
+ To: IANA@IANA.ORG
628
+ Subject: Registration of new Content-Disposition parameter
629
+
630
+ Content-Disposition parameter name:
631
+
632
+ Allowable values for this parameter:
633
+ (If the parameter can only assume a small number of values,
634
+ list each of those values. Otherwise, describe the values
635
+ that the parameter can assume.)
636
+ Description:
637
+ (What is the purpose of this parameter and how is it used?)
638
+
639
+ 10. Changes since RFC 1806
640
+
641
+ The following changes have been made since the earlier version of
642
+ this document, published in RFC 1806 as an Experimental protocol:
643
+
644
+ + Updated references to MIME documents. In some cases this
645
+ involved substituting a reference to one of the current MIME
646
+ RFCs for a reference to RFC 1521; in other cases, a reference to
647
+ RFC 1521 was simply replaced with the word "MIME".
648
+
649
+ + Added a section on registration procedures, since none of the
650
+ procedures in RFC 2048 seemed to be appropriate.
651
+
652
+ + Added new parameter types: creation-date, modification-date,
653
+ read-date, and size.
654
+
655
+
656
+ + Incorporated a reference to draft-freed-pvcsc-* for encoding
657
+ long or non-ASCII parameter values.
658
+
659
+ + Added reference to RFC 2119 to define MUST, SHOULD, etc.
660
+ keywords.
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+ Troost, et. al. Standards Track [Page 12]
675
+