def _split_mime_type(mime_type):
  if mime_type:
    match = _MIME_PATTERN.match(mime_type)
    if not match:
      raise _InvalidMIMETypeFormatError(
          'Incorrectly formatted MIME type: %s' % mime_type)
    return match.groups()
  else:
    return 'application', 'octet-stream'
Split MIME type into main type and subtype.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/blob_upload.py/_split_mime_type