submit 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. CDDB SUBMISSION
  2. ---------------
  3. Your software may allow users to enter CDDB data and then submit them
  4. to the freedb archive.
  5. There are two methods of submission: <a href="#email">via e-mail</a> or <a href="#http">via http</a> using submit.cgi
  6. <a name="email"></a>1. Submission via e-mail
  7. ------------------------
  8. Your software has to send the entry to the
  9. following address:
  10. freedb-submit@freedb.org
  11. You may implement a button or somesuch in your software's user-interface
  12. to facilitate this. The destination e-mail address should be made
  13. user-configurable.
  14. There should be one e-mail message per freedb entry. The mail Subject
  15. line should be in the form "cddb category discid". For example:
  16. Subject: cddb rock 850f970b
  17. The body of the e-mail message should be in the format of a CDDB file
  18. entry as described <a href="http://freedb.freedb.org/software/old/DBFORMAT">here</a>. The messages should contain only
  19. plain ASCII text. Do not attach encoded information or add special
  20. escape sequences.
  21. Note that the disc ID specified in the mail Subject line should
  22. also appear in the list of disc IDs in the DISCID= field of the
  23. CDDB file entry. If not, it is considered an error and the submission
  24. will be rejected.
  25. You should only allow categories that are currently supported by the
  26. freedb (blues, classical, country, data, folk, jazz, misc, newage,
  27. reggae, rock, soundtrack). Submissions specifying unsupported
  28. categories will be rejected.
  29. Please do not allow a user to submit CD database entries that
  30. have completely unfilled contents (i.e., blank information in the
  31. disc artist/title as well as the track titles, or filled with
  32. useless default information like "track 1", "track 2", etc.).
  33. While the current CD database server checks and rejects submissions
  34. that have a blank DTITLE line, it doesn't (and can't feasibly) check
  35. the track titles effectively, nor can it check any of these fields
  36. if they are filled with a default string. If it were, it would
  37. have to be hacked to know about the default strings of every possible
  38. client.
  39. Thus, please design your client with this in mind. This is a somewhat
  40. tricky thing to do, as some CDs contain blank tracks with no titles
  41. and you need to allow for that. An example minimum requirement
  42. that a CD player client should meet is listed below:
  43. 1. Don't allow the "send" or "submit" feature to be activated if
  44. the CD database information form is not edited at all.
  45. 2. Check that the disc artist/title contains something (that the user
  46. typed in).
  47. 3. Check that all of the tracks have a title filled in by the user
  48. (some (but not all!) may be blank, but not the default string).
  49. This should minimize the number of useless garbage being submitted
  50. into the CD database.
  51. Before you release your software, please be sure that it produces
  52. submissions that adheres to the CDDB file format, and that the frame
  53. offset, disc length, and disc ID information are correctly computed.
  54. For testing, please make your software send submissions to the
  55. following e-mail address (rather than the real submission site at
  56. freedb-submit@freedb.org):
  57. test-submit@freedb.org
  58. The test address performs sanity checking on the CDDB submission and
  59. sends back pass/fail confirmation, but does not actually deposit the
  60. entry in the CD database.
  61. <a name="http"></a>2. Submission via http
  62. ----------------------
  63. For submit via http, your application has to transmit the entry to the
  64. database through a CGI program at the following URL:
  65. http://freedb.freedb.org/~cddb/submit.cgi
  66. Submissions are made through the CGI program as follows. You must only use
  67. the "POST" method of sending data; "GET" is not supported. There are several
  68. HTTP "Entity-Header" fields that must be included in the data followed by a
  69. blank line, followed by the "Entity-Body" (a.k.a the CDDB entry) in the
  70. format described in Appendix B below. The required header fields are:
  71. Category: CDDB_category
  72. Discid: CDDB_discid
  73. User-Email: user@domain
  74. Submit-Mode: test_or_submit
  75. Content-Length: length_of_CDDB_entry
  76. Where:
  77. - "CDDB_category" is one of the valid CDDB categories (blues, classical,
  78. country, data, folk, jazz, misc, newage, reggae, rock, soundtrack).
  79. Invalid categories will result in the entry being rejected.
  80. - "CDDB_discid" is the 8-digit hex CDDB disc ID of the entry as described in
  81. the "<a href="http://freedb.freedb.org/sections.php?op=viewarticle&artid=6">Discid howto</a>" section. This must be the same disc ID that appears
  82. in the "DISCID=" section of the entry being submitted. If not, the entry
  83. will be rejected.
  84. - "user@domain" is the valid email address of the user submitting the entry.
  85. This is required in case a submission failure notice must be sent to the
  86. user.
  87. - "test_or_submit" is the word "test" or "submit" (without the surrounding
  88. quotes) to indicate whether the submission is a test submission or a real
  89. submission to the database, respectively. See <a href="#testsubmission">below</a> for an explanation of
  90. test submissions.
  91. - "length_of_CDDB_entry" is the size in bytes of the CDDB entry being
  92. submitted. This number does not include the length of the header or the
  93. blank line separating the HTTP header and the CDDB entry.
  94. There are several additional optional HTTP header fields that may also
  95. be specified (but which are currently not used by the freedb):
  96. Charset: character_set_of_CDDB_entry
  97. X-Cddbd-Note: message for user
  98. Where:
  99. - "character_set_of_CDDB_entry" is one of ISO-8859-1 or US-ASCII (lower case
  100. may be used if desired). This specifies to the CDDB server which character
  101. set the CDDB entry has been encoded in. If your application knows the
  102. user's character set, then you should specify it here. Only these two
  103. character sets are supported currently. DO NOT specify the character set
  104. if your application does not have any way of verifying the user's character
  105. set (i.e. do not guess; it's better not to specify it at all).
  106. - "message for user" is an arbitrary message to be included at the top of
  107. any rejection notice that may be sent to the submitting user.
  108. An example submission showing the HTTP command, "Entity-Header" and "Entity-
  109. Body" follows:
  110. POST /~cddb/submit.cgi HTTP/1.0
  111. Category: rock
  112. Discid: 2a09310a
  113. User-Email: joe@joeshost.joesdomain.com
  114. Submit-Mode: submit
  115. Charset: ISO-8859-1
  116. X-Cddbd-Note: Problems with Super CD Player? Send email to support@supercd.com.
  117. Content-Length: 820
  118. # xmcd
  119. #
  120. # Track frame offsets:
  121. [ data omitted in this example for brevity ]
  122. PLAYORDER=
  123. Note the blank line between the "Content-Length" header field and the
  124. "# xmcd" which marks the beginning of the CDDB entry.
  125. When your application submits an entry through the CGI program, it will
  126. respond with a 3-digit response code indicating whether or not the entry has
  127. been forwarded to the freedb server for inclusion in the database, followed
  128. by a textual description of the response code. For example:
  129. 200 OK, submission has been sent.
  130. 400 Internal error: failed to forward submission.
  131. 500 Missing required header information.
  132. These are but a few of the possible responses.
  133. See the description of the <a href="http://freedb.freedb.org/sections.php?op=viewarticle&artid=28">CDDB server protocol</a> for more information on
  134. handling response codes.
  135. The body of the freedb entry being submitted should be sent verbatim as
  136. described in the <a href="http://freedb.freedb.org/software/old/DBFORMAT">database-format specification</a>. DO NOT encode the data in any
  137. way before transmitting it; data must be sent as raw text. For example,
  138. Windows programmers should not use the Windows URL encode function prior to
  139. calling the submit CGI program. Doing so may lead to corrupt data being sent
  140. and also possibly to rejected submissions.
  141. You may implement a button or somesuch in your software's user interface
  142. to initiate submissions. Rejected submissions are automatically returned
  143. via email to the sender specified in the "User-Email" header field with an
  144. explanation of the reason for the rejection.
  145. Please do not allow a user to submit CD database entries that
  146. have completely unfilled contents (i.e., blank information in the
  147. disc artist/title as well as the track titles, or filled with
  148. useless default information like "track 1", "track 2", etc.).
  149. While the current CD database server checks and rejects submissions
  150. that have a blank DTITLE line, it doesn't (and can't feasibly) check
  151. the track titles effectively, nor can it check any of these fields
  152. if they are filled with a default string. If it were, it would
  153. have to be hacked to know about the default strings of every possible
  154. client.
  155. Thus, please design your client with this in mind. This is a somewhat
  156. tricky thing to do, as some CDs contain blank tracks with no titles
  157. and you need to allow for that. An example minimum requirement
  158. that a CD player client should meet is listed below:
  159. 1. Don't allow the "send" or "submit" feature to be activated if
  160. the CD database information form is not edited at all.
  161. 2. Check that the disc artist/title contains something (that the user
  162. typed in).
  163. 3. Check that all of the tracks have a title filled in by the user.
  164. (some (but not all!) may be blank, but not the default string).
  165. Before you release your software, please be sure that it produces
  166. submissions that adhere to the CDDB file format, and that the frame
  167. offset, disc length, and disc ID information are correctly computed.
  168. For testing, please make your software send submissions with the
  169. "Submit-Mode" HTTP header field set to "test".
  170. <a name="testsubmission"></a>CDDB submissions sent in test mode will be sanity-checked by the freedb server
  171. and pass/fail confirmation sent back to the submitter, but will not actually
  172. be deposited in the CD database. Please DO NOT send submisions in "submit"
  173. mode until you have tested your program with several different CD's.