@@ -88,7 +88,7 @@ The following classes are provided:
8888 :class: `DefaultCookiePolicy ` objects.
8989
9090 :class: `DefaultCookiePolicy ` implements the standard accept / reject rules for
91- Netscape and RFC 2965 cookies. By default, RFC 2109 cookies (ie. cookies
91+ Netscape and :rfc: ` 2965 ` cookies. By default, :rfc: ` 2109 ` cookies (ie. cookies
9292 received in a :mailheader: `Set-Cookie ` header with a version cookie-attribute of
9393 1) are treated according to the RFC 2965 rules. However, if RFC 2965 handling
9494 is turned off or :attr: `rfc2109_as_netscape ` is ``True ``, RFC 2109 cookies are
@@ -100,7 +100,7 @@ The following classes are provided:
100100
101101.. class :: Cookie()
102102
103- This class represents Netscape, RFC 2109 and RFC 2965 cookies. It is not
103+ This class represents Netscape, :rfc: ` 2109 ` and :rfc: ` 2965 ` cookies. It is not
104104 expected that users of :mod: `http.cookiejar ` construct their own :class: `Cookie `
105105 instances. Instead, if necessary, call :meth: `make_cookies ` on a
106106 :class: `CookieJar ` instance.
@@ -123,14 +123,14 @@ The following classes are provided:
123123 the one sketched out in ``cookie_spec.html ``.
124124
125125 :rfc: `2109 ` - HTTP State Management Mechanism
126- Obsoleted by RFC 2965. Uses :mailheader: `Set-Cookie ` with version=1.
126+ Obsoleted by :rfc: ` 2965 ` . Uses :mailheader: `Set-Cookie ` with version=1.
127127
128128 :rfc: `2965 ` - HTTP State Management Mechanism
129129 The Netscape protocol with the bugs fixed. Uses :mailheader: `Set-Cookie2 ` in
130130 place of :mailheader: `Set-Cookie `. Not widely used.
131131
132132 http://kristol.org/cookie/errata.html
133- Unfinished errata to RFC 2965.
133+ Unfinished errata to :rfc: ` 2965 ` .
134134
135135 :rfc: `2964 ` - Use of HTTP State Management
136136
@@ -320,7 +320,7 @@ writing.
320320
321321 .. note ::
322322
323- This loses information about RFC 2965 cookies, and also about newer or
323+ This loses information about :rfc: ` 2965 ` cookies, and also about newer or
324324 non-standard cookie-attributes such as ``port ``.
325325
326326 .. warning ::
@@ -410,13 +410,13 @@ be assigned to.
410410
411411.. attribute :: CookiePolicy.rfc2965
412412
413- Implement RFC 2965 protocol.
413+ Implement :rfc: ` 2965 ` protocol.
414414
415415
416416.. attribute :: CookiePolicy.hide_cookie2
417417
418418 Don't add :mailheader: `Cookie2 ` header to requests (the presence of this header
419- indicates to the server that we understand RFC 2965 cookies).
419+ indicates to the server that we understand :rfc: ` 2965 ` cookies).
420420
421421The most useful way to define a :class: `CookiePolicy ` class is by subclassing
422422from :class: `DefaultCookiePolicy ` and overriding some or all of the methods
@@ -431,7 +431,7 @@ DefaultCookiePolicy Objects
431431
432432Implements the standard rules for accepting and returning cookies.
433433
434- Both RFC 2965 and Netscape cookies are covered. RFC 2965 handling is switched
434+ Both :rfc: ` 2965 ` and Netscape cookies are covered. RFC 2965 handling is switched
435435off by default.
436436
437437The easiest way to provide your own policy is to override this class and call
@@ -510,11 +510,11 @@ all be assigned to.
510510
511511.. attribute :: DefaultCookiePolicy.rfc2109_as_netscape
512512
513- If true, request that the :class: `CookieJar ` instance downgrade RFC 2109 cookies
513+ If true, request that the :class: `CookieJar ` instance downgrade :rfc: ` 2109 ` cookies
514514 (ie. cookies received in a :mailheader: `Set-Cookie ` header with a version
515515 cookie-attribute of 1) to Netscape cookies by setting the version attribute of
516516 the :class: `Cookie ` instance to 0. The default value is :const: `None `, in which
517- case RFC 2109 cookies are downgraded if and only if RFC 2965 handling is turned
517+ case RFC 2109 cookies are downgraded if and only if :rfc: ` 2965 ` handling is turned
518518 off. Therefore, RFC 2109 cookies are downgraded by default.
519519
520520
@@ -527,11 +527,11 @@ General strictness switches:
527527 and isn't guaranteed to work!
528528
529529
530- RFC 2965 protocol strictness switches:
530+ :rfc: ` 2965 ` protocol strictness switches:
531531
532532.. attribute :: DefaultCookiePolicy.strict_rfc2965_unverifiable
533533
534- Follow RFC 2965 rules on unverifiable transactions (usually, an unverifiable
534+ Follow :rfc: ` 2965 ` rules on unverifiable transactions (usually, an unverifiable
535535 transaction is one resulting from a redirect or a request for an image hosted on
536536 another site). If this is false, cookies are *never * blocked on the basis of
537537 verifiability
@@ -541,7 +541,7 @@ Netscape protocol strictness switches:
541541
542542.. attribute :: DefaultCookiePolicy.strict_ns_unverifiable
543543
544- Apply RFC 2965 rules on unverifiable transactions even to Netscape cookies.
544+ Apply :rfc: ` 2965 ` rules on unverifiable transactions even to Netscape cookies.
545545
546546
547547.. attribute :: DefaultCookiePolicy.strict_ns_domain
@@ -581,7 +581,7 @@ both flags are set).
581581
582582.. attribute :: DefaultCookiePolicy.DomainRFC2965Match
583583
584- When setting cookies, require a full RFC 2965 domain-match.
584+ When setting cookies, require a full :rfc: ` 2965 ` domain-match.
585585
586586The following attributes are provided for convenience, and are the most useful
587587combinations of the above flags:
@@ -605,7 +605,7 @@ Cookie Objects
605605standard cookie-attributes specified in the various cookie standards. The
606606correspondence is not one-to-one, because there are complicated rules for
607607assigning default values, because the ``max-age `` and ``expires ``
608- cookie-attributes contain equivalent information, and because RFC 2109 cookies
608+ cookie-attributes contain equivalent information, and because :rfc: ` 2109 ` cookies
609609may be 'downgraded' by :mod: `http.cookiejar ` from version 1 to version 0 (Netscape)
610610cookies.
611611
@@ -616,8 +616,8 @@ internal consistency, so you should know what you're doing if you do that.
616616
617617.. attribute :: Cookie.version
618618
619- Integer or :const: `None `. Netscape cookies have :attr: `version ` 0. RFC 2965 and
620- RFC 2109 cookies have a ``version `` cookie-attribute of 1. However, note that
619+ Integer or :const: `None `. Netscape cookies have :attr: `version ` 0. :rfc: ` 2965 ` and
620+ :rfc: ` 2109 ` cookies have a ``version `` cookie-attribute of 1. However, note that
621621 :mod: `http.cookiejar ` may 'downgrade' RFC 2109 cookies to Netscape cookies, in which
622622 case :attr: `version ` is 0.
623623
@@ -673,7 +673,7 @@ internal consistency, so you should know what you're doing if you do that.
673673
674674.. attribute :: Cookie.rfc2109
675675
676- ``True `` if this cookie was received as an RFC 2109 cookie (ie. the cookie
676+ ``True `` if this cookie was received as an :rfc: ` 2109 ` cookie (ie. the cookie
677677 arrived in a :mailheader: `Set-Cookie ` header, and the value of the Version
678678 cookie-attribute in that header was 1). This attribute is provided because
679679 :mod: `http.cookiejar ` may 'downgrade' RFC 2109 cookies to Netscape cookies, in
@@ -745,7 +745,7 @@ cookies (assumes Unix/Netscape convention for location of the cookies file)::
745745 r = opener.open("http://example.com/")
746746
747747The next example illustrates the use of :class: `DefaultCookiePolicy `. Turn on
748- RFC 2965 cookies, be more strict about domains when setting and returning
748+ :rfc: ` 2965 ` cookies, be more strict about domains when setting and returning
749749Netscape cookies, and block some domains from setting cookies or having them
750750returned::
751751
0 commit comments