Advertisement
Guest User

Untitled

a guest
Jun 16th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # $Id: mimetypes.yaml 591 2010-09-14 02:14:08Z ian $
  2. # This is the content type definition file.
  3. # It is in YAML format as a list of hashes.
  4.  
  5. # Essentially this file is a series of YAML documents, each separated
  6. # by three dashes on its own line. The data is loaded into instances
  7. # of the FeedFetcherMimeType class. The key/value pairs represent the
  8. # class fields to load into, so it is important NOT to misspell them
  9. # or alter their case. Use title, contentType, and extension
  10.  
  11. # The patterns themselves are standard regular expressions. They do not
  12. # need extra escaping of special regex characters such as ? (see
  13. # the xml example where the ? character is escaped by a single backspace
  14. # character as in perl code. In Java code you would need four backspace
  15. # characters, two for the string escape and two more to get the backspace
  16. # character in the resulting string.
  17.  
  18. # The whole document is not checked, only the first 256 characters
  19. # (see MessageMimeTypeTransformer), so the pattern to detect must exist
  20. # within this section.
  21.  
  22. # GZ Compressed Data
  23. # Needs to be first so that it can be returned and re-run after decompressing
  24. ---
  25. title: GZ Compressed Data
  26. # This is what it SHOULD be. 8b is 139 and ef is 239
  27. # 139 10001011
  28. # 239 11101111
  29. #hexPattern: 1f8b
  30. hexPattern: 1fef
  31. pattern:
  32. contentType: application/x-gzip
  33. extension: gz
  34. compressible: false
  35.  
  36. # BZ2 compressed data
  37. # This is for testing purposes
  38. #---
  39. #title: BZipped Data
  40. #hexPattern: 425a68
  41. #pattern:
  42. #contentType: application/x-bzip2
  43. #extension: bz2
  44.  
  45. # GIF IMAGE
  46. ---
  47. title: GIF Image
  48. hexPattern:
  49. pattern: ^GIF.*$
  50. contentType: image/gif
  51. extension: gif
  52. compressible: false
  53.  
  54. # JPEG IMAGE
  55. ---
  56. title: JPEG Image
  57. hexPattern:
  58. pattern: ^.+?JFIF.*$
  59. contentType: image/jpeg
  60. extension: jpeg
  61. compressible: false
  62.  
  63. # SportsML TEXT
  64. ---
  65. title: XML Document
  66. hexPattern:
  67. pattern: ^.*?<\?xml.*?<sports-content.*$
  68. contentType: text/sportsml+xml
  69. extension: xml
  70. compressible: true
  71.  
  72. # XML TEXT
  73. ---
  74. title: XML Document
  75. hexPattern:
  76. pattern: ^.*?<\?xml.*$
  77. contentType: text/xml
  78. extension: xml
  79. compressible: true
  80.  
  81. # XSL TEXT
  82. ---
  83. title: XSL Stylesheet Document
  84. hexPattern:
  85. pattern: ^.*?<\?xsl:stylesheet.*$
  86. contentType: text/xslt+xml
  87. extension: xsl
  88. compressible: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement