Home
last modified time | relevance | path

Searched refs:guess_type (Results 1 – 25 of 31) sorted by relevance

12

/external/python/cpython3/Lib/test/
Dtest_mimetypes.py21 eq(self.db.guess_type("foo.html"), ("text/html", None))
22 eq(self.db.guess_type("foo.tgz"), ("application/x-tar", "gzip"))
23 eq(self.db.guess_type("foo.tar.gz"), ("application/x-tar", "gzip"))
24 eq(self.db.guess_type("foo.tar.Z"), ("application/x-tar", "compress"))
25 eq(self.db.guess_type("foo.tar.bz2"), ("application/x-tar", "bzip2"))
26 eq(self.db.guess_type("foo.tar.xz"), ("application/x-tar", "xz"))
30 guess_type = self.db.guess_type
31 eq(guess_type("data:,thisIsTextPlain"), ("text/plain", None))
32 eq(guess_type("data:;base64,thisIsTextPlain"), ("text/plain", None))
33 eq(guess_type("data:text/x-foo,thisIsTextXFoo"), ("text/x-foo", None))
[all …]
/external/python/cpython2/Lib/test/
Dtest_mimetypes.py22 eq(self.db.guess_type("foo.html"), ("text/html", None))
23 eq(self.db.guess_type("foo.tgz"), ("application/x-tar", "gzip"))
24 eq(self.db.guess_type("foo.tar.gz"), ("application/x-tar", "gzip"))
25 eq(self.db.guess_type("foo.tar.Z"), ("application/x-tar", "compress"))
26 eq(self.db.guess_type("foo.tar.bz2"), ("application/x-tar", "bzip2"))
27 eq(self.db.guess_type("foo.tar.xz"), ("application/x-tar", "xz"))
31 guess_type = self.db.guess_type
32 eq(guess_type("data:,thisIsTextPlain"), ("text/plain", None))
33 eq(guess_type("data:;base64,thisIsTextPlain"), ("text/plain", None))
34 eq(guess_type("data:text/x-foo,thisIsTextXFoo"), ("text/x-foo", None))
[all …]
/external/python/cpython3/Lib/
Dmimetypes.py97 def guess_type(self, url, strict=True): member in MimeTypes
271 def guess_type(url, strict=True): function
291 return _db.guess_type(url, strict)
593 guess, encoding = guess_type(gtype, strict)
/external/python/cpython2/Lib/
Dmimetypes.py95 def guess_type(self, url, strict=True): member in MimeTypes
274 def guess_type(url, strict=True): function
294 return _db.guess_type(url, strict)
597 guess, encoding = guess_type(gtype, strict)
DSimpleHTTPServer.py89 ctype = self.guess_type(path)
194 def guess_type(self, path): member in SimpleHTTPRequestHandler
Durllib2.py1361 mtype = mimetypes.guess_type(filename)[0]
1422 mtype = mimetypes.guess_type(req.get_full_url())[0]
Durllib.py486 mtype = mimetypes.guess_type(url)[0]
559 mtype = mimetypes.guess_type("ftp:" + url)[0]
/external/python/cpython3/Doc/library/
Dmimetypes.rst29 .. function:: guess_type(url, strict=True)
59 type *type* by :func:`guess_type`.
61 The optional *strict* argument has the same meaning as with the :func:`guess_type` function.
70 :func:`guess_type`. If no extension can be guessed for *type*, ``None`` is
73 The optional *strict* argument has the same meaning as with the :func:`guess_type` function.
226 .. method:: MimeTypes.guess_type(url, strict=True)
228 Similar to the :func:`guess_type` function, using the tables stored as part of
/external/python/cpython2/Doc/library/
Dmimetypes.rst29 .. function:: guess_type(url, strict=True)
59 type *type* by :func:`guess_type`.
61 The optional *strict* argument has the same meaning as with the :func:`guess_type` function.
70 :func:`guess_type`. If no extension can be guessed for *type*, ``None`` is
73 The optional *strict* argument has the same meaning as with the :func:`guess_type` function.
226 .. method:: MimeTypes.guess_type(url, strict=True)
228 Similar to the :func:`guess_type` function, using the tables stored as part of
Dsimplehttpserver.rst73 type is guessed by calling the :meth:`guess_type` method, which in turn
/external/autotest/client/common_lib/
Dmagic.py1020 def guess_type(filename): function
1069 msg = guess_type(arg)
/external/python/cpython2/Tools/scripts/
Dserve.py18 type = mimetypes.guess_type(fn)[0]
/external/python/cpython3/Tools/scripts/
Dserve.py18 type = mimetypes.guess_type(fn)[0]
/external/python/cpython3/Doc/includes/
Demail-dir.py56 ctype, encoding = mimetypes.guess_type(path)
/external/python/cpython2/Doc/includes/
Demail-dir.py72 ctype, encoding = mimetypes.guess_type(path)
/external/clang/tools/scan-view/share/
DReporter.py87 ctype, encoding = mimetypes.guess_type(path)
DScanView.py707 ctype = self.guess_type(path)
/external/python/cpython3/Lib/http/
Dserver.py694 ctype = self.guess_type(path)
846 def guess_type(self, path): member in SimpleHTTPRequestHandler
/external/autotest/client/bin/
Dutils.py73 if magic.guess_type(file) == 'application/x-bzip2':
75 elif magic.guess_type(file) == 'application/x-gzip':
700 if magic.guess_type(config) == 'application/x-gzip':
/external/googletest/googletest/scripts/
Dupload.py535 return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
715 mimetype = mimetypes.guess_type(filename)[0]
/external/googletest/googlemock/scripts/
Dupload.py535 return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
715 mimetype = mimetypes.guess_type(filename)[0]
/external/google-breakpad/src/testing/scripts/
Dupload.py535 return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
715 mimetype = mimetypes.guess_type(filename)[0]
/external/google-breakpad/src/testing/gtest/scripts/
Dupload.py535 return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
715 mimetype = mimetypes.guess_type(filename)[0]
/external/python/cpython3/Lib/urllib/
Drequest.py1476 mtype = mimetypes.guess_type(filename)[0]
1542 mtype = mimetypes.guess_type(req.full_url)[0]
1988 mtype = mimetypes.guess_type(url)[0]
2055 mtype = mimetypes.guess_type("ftp:" + url)[0]
/external/python/google-api-python-client/googleapiclient/
Ddiscovery.py810 media_mime_type, _ = mimetypes.guess_type(media_filename)

12