# SOME DESCRIPTIVE TITLE. # Copyright (C) 1990-2016, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 2.7\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-10-30 10:44+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../Doc/library/cookie.rst:2 msgid ":mod:`Cookie` --- HTTP state management" msgstr "" #: ../Doc/library/cookie.rst:10 msgid "" "The :mod:`Cookie` module has been renamed to :mod:`http.cookies` in Python " "3. The :term:`2to3` tool will automatically adapt imports when converting " "your sources to Python 3." msgstr "" #: ../Doc/library/cookie.rst:14 msgid "**Source code:** :source:`Lib/Cookie.py`" msgstr "" #: ../Doc/library/cookie.rst:18 msgid "" "The :mod:`Cookie` module defines classes for abstracting the concept of " "cookies, an HTTP state management mechanism. It supports both simple string-" "only cookies, and provides an abstraction for having any serializable data-" "type as cookie value." msgstr "" #: ../Doc/library/cookie.rst:23 msgid "" "The module formerly strictly applied the parsing rules described in the :rfc:" "`2109` and :rfc:`2068` specifications. It has since been discovered that " "MSIE 3.0x doesn't follow the character rules outlined in those specs and " "also many current day browsers and servers have relaxed parsing rules when " "comes to Cookie handling. As a result, the parsing rules used are a bit " "less strict." msgstr "" #: ../Doc/library/cookie.rst:29 msgid "" "The character set, :data:`string.ascii_letters`, :data:`string.digits` and " "``!#$%&'*+-.^_`|~`` denote the set of valid characters allowed by this " "module in Cookie name (as :attr:`~Morsel.key`)." msgstr "" #: ../Doc/library/cookie.rst:36 msgid "" "On encountering an invalid cookie, :exc:`CookieError` is raised, so if your " "cookie data comes from a browser you should always prepare for invalid data " "and catch :exc:`CookieError` on parsing." msgstr "" #: ../Doc/library/cookie.rst:43 msgid "" "Exception failing because of :rfc:`2109` invalidity: incorrect attributes, " "incorrect :mailheader:`Set-Cookie` header, etc." msgstr "" #: ../Doc/library/cookie.rst:49 msgid "" "This class is a dictionary-like object whose keys are strings and whose " "values are :class:`Morsel` instances. Note that upon setting a key to a " "value, the value is first converted to a :class:`Morsel` containing the key " "and the value." msgstr "" #: ../Doc/library/cookie.rst:53 msgid "If *input* is given, it is passed to the :meth:`load` method." msgstr "" #: ../Doc/library/cookie.rst:58 msgid "" "This class derives from :class:`BaseCookie` and overrides :meth:" "`value_decode` and :meth:`value_encode` to be the identity and :func:`str` " "respectively." msgstr "" #: ../Doc/library/cookie.rst:64 msgid "" "This class derives from :class:`BaseCookie` and overrides :meth:" "`value_decode` and :meth:`value_encode` to be the :func:`pickle.loads` and :" "func:`pickle.dumps`." msgstr "" #: ../Doc/library/cookie.rst:68 msgid "" "Reading pickled values from untrusted cookie data is a huge security hole, " "as pickle strings can be crafted to cause arbitrary code to execute on your " "server. It is supported for backwards compatibility only, and may eventually " "go away." msgstr "" #: ../Doc/library/cookie.rst:76 msgid "" "This class derives from :class:`BaseCookie`. It overrides :meth:" "`value_decode` to be :func:`pickle.loads` if it is a valid pickle, and " "otherwise the value itself. It overrides :meth:`value_encode` to be :func:" "`pickle.dumps` unless it is a string, in which case it returns the value " "itself." msgstr "" #: ../Doc/library/cookie.rst:81 msgid "The same security warning from :class:`SerialCookie` applies here." msgstr "" #: ../Doc/library/cookie.rst:84 msgid "" "A further security note is warranted. For backwards compatibility, the :mod:" "`Cookie` module exports a class named :class:`Cookie` which is just an alias " "for :class:`SmartCookie`. This is probably a mistake and will likely be " "removed in a future version. You should not use the :class:`Cookie` class " "in your applications, for the same reason why you should not use the :class:" "`SerialCookie` class." msgstr "" #: ../Doc/library/cookie.rst:96 msgid "Module :mod:`cookielib`" msgstr "" #: ../Doc/library/cookie.rst:95 msgid "" "HTTP cookie handling for web *clients*. The :mod:`cookielib` and :mod:" "`Cookie` modules do not depend on each other." msgstr "" #: ../Doc/library/cookie.rst:98 msgid ":rfc:`2109` - HTTP State Management Mechanism" msgstr "" #: ../Doc/library/cookie.rst:99 msgid "This is the state management specification implemented by this module." msgstr "" #: ../Doc/library/cookie.rst:105 msgid "Cookie Objects" msgstr "" #: ../Doc/library/cookie.rst:110 msgid "" "Return a decoded value from a string representation. Return value can be any " "type. This method does nothing in :class:`BaseCookie` --- it exists so it " "can be overridden." msgstr "" #: ../Doc/library/cookie.rst:117 msgid "" "Return an encoded value. *val* can be any type, but return value must be a " "string. This method does nothing in :class:`BaseCookie` --- it exists so it " "can be overridden." msgstr "" #: ../Doc/library/cookie.rst:121 msgid "" "In general, it should be the case that :meth:`value_encode` and :meth:" "`value_decode` are inverses on the range of *value_decode*." msgstr "" #: ../Doc/library/cookie.rst:127 msgid "" "Return a string representation suitable to be sent as HTTP headers. *attrs* " "and *header* are sent to each :class:`Morsel`'s :meth:`output` method. *sep* " "is used to join the headers together, and is by default the combination " "``'\\r\\n'`` (CRLF)." msgstr "" #: ../Doc/library/cookie.rst:132 msgid "" "The default separator has been changed from ``'\\n'`` to match the cookie " "specification." msgstr "" #: ../Doc/library/cookie.rst:139 msgid "" "Return an embeddable JavaScript snippet, which, if run on a browser which " "supports JavaScript, will act the same as if the HTTP headers was sent." msgstr "" #: ../Doc/library/cookie.rst:142 ../Doc/library/cookie.rst:224 #: ../Doc/library/cookie.rst:232 msgid "The meaning for *attrs* is the same as in :meth:`output`." msgstr "" #: ../Doc/library/cookie.rst:147 msgid "" "If *rawdata* is a string, parse it as an ``HTTP_COOKIE`` and add the values " "found there as :class:`Morsel`\\ s. If it is a dictionary, it is equivalent " "to::" msgstr "" #: ../Doc/library/cookie.rst:157 msgid "Morsel Objects" msgstr "" #: ../Doc/library/cookie.rst:162 msgid "Abstract a key/value pair, which has some :rfc:`2109` attributes." msgstr "" #: ../Doc/library/cookie.rst:164 msgid "" "Morsels are dictionary-like objects, whose set of keys is constant --- the " "valid :rfc:`2109` attributes, which are" msgstr "" #: ../Doc/library/cookie.rst:167 msgid "``expires``" msgstr "``expires``" #: ../Doc/library/cookie.rst:168 msgid "``path``" msgstr "``path``" #: ../Doc/library/cookie.rst:169 msgid "``comment``" msgstr "``comment``" #: ../Doc/library/cookie.rst:170 msgid "``domain``" msgstr "``domain``" #: ../Doc/library/cookie.rst:171 msgid "``max-age``" msgstr "``max-age``" #: ../Doc/library/cookie.rst:172 msgid "``secure``" msgstr "``secure``" #: ../Doc/library/cookie.rst:173 msgid "``version``" msgstr "``version``" #: ../Doc/library/cookie.rst:174 msgid "``httponly``" msgstr "``httponly``" #: ../Doc/library/cookie.rst:176 msgid "" "The attribute :attr:`httponly` specifies that the cookie is only transferred " "in HTTP requests, and is not accessible through JavaScript. This is intended " "to mitigate some forms of cross-site scripting." msgstr "" #: ../Doc/library/cookie.rst:180 msgid "The keys are case-insensitive." msgstr "" #: ../Doc/library/cookie.rst:182 msgid "The :attr:`httponly` attribute was added." msgstr "" #: ../Doc/library/cookie.rst:188 msgid "The value of the cookie." msgstr "" #: ../Doc/library/cookie.rst:193 msgid "The encoded value of the cookie --- this is what should be sent." msgstr "" #: ../Doc/library/cookie.rst:198 msgid "The name of the cookie." msgstr "" #: ../Doc/library/cookie.rst:203 msgid "Set the *key*, *value* and *coded_value* attributes." msgstr "" #: ../Doc/library/cookie.rst:208 msgid "Whether *K* is a member of the set of keys of a :class:`Morsel`." msgstr "" #: ../Doc/library/cookie.rst:213 msgid "" "Return a string representation of the Morsel, suitable to be sent as an HTTP " "header. By default, all the attributes are included, unless *attrs* is " "given, in which case it should be a list of attributes to use. *header* is " "by default ``\"Set-Cookie:\"``." msgstr "" #: ../Doc/library/cookie.rst:221 msgid "" "Return an embeddable JavaScript snippet, which, if run on a browser which " "supports JavaScript, will act the same as if the HTTP header was sent." msgstr "" #: ../Doc/library/cookie.rst:229 msgid "" "Return a string representing the Morsel, without any surrounding HTTP or " "JavaScript." msgstr "" #: ../Doc/library/cookie.rst:238 msgid "Example" msgstr "Exemple" #: ../Doc/library/cookie.rst:240 msgid "The following example demonstrates how to use the :mod:`Cookie` module." msgstr ""