svn: /phpdoc/en/trunk/ language/variables.xml reference/network/functions/setcookie.xml
| From: | Justin Martin | Date: | Sat, 03 Dec 2011 20:41:05 +0000 |
| Subject: | svn: /phpdoc/en/trunk/ language/variables.xml reference/network/functions/setcookie.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9132@lists.php.net to get a copy of this message | ||
frozenfire Sat, 03 Dec 2011 20:41:05 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=320317
Log:
Updated to reflect that cookies are now governed by RFC 6265 instead of RFC 2109. Closes bug #60026.
Bug: https://bugs.php.net/60026 (Assigned) Remove
references to obsolete RFC 2109 in manual page for setcookie()
Changed paths:
U phpdoc/en/trunk/language/variables.xml
U phpdoc/en/trunk/reference/network/functions/setcookie.xml
Modified: phpdoc/en/trunk/language/variables.xml
===================================================================
--- phpdoc/en/trunk/language/variables.xml 2011-12-03 20:19:53 UTC (rev 320316)
+++ phpdoc/en/trunk/language/variables.xml 2011-12-03 20:41:05 UTC (rev 320317)
@@ -969,7 +969,7 @@
<simpara>
PHP transparently supports HTTP cookies as defined by <link
- xlink:href="&spec.cookies;">Netscape's Spec</link>. Cookies are a
+ xlink:href="&url.rfc;6265">RFC 6265</link>. Cookies are a
mechanism for storing data in the remote browser and thus
tracking or identifying return users. You can set cookies using
the <function>setcookie</function> function. Cookies are part of
Modified: phpdoc/en/trunk/reference/network/functions/setcookie.xml
===================================================================
--- phpdoc/en/trunk/reference/network/functions/setcookie.xml 2011-12-03 20:19:53 UTC (rev 320316)
+++ phpdoc/en/trunk/reference/network/functions/setcookie.xml 2011-12-03 20:41:05 UTC (rev 320317)
@@ -48,7 +48,7 @@
instead.
</para>
<para>
- <link xlink:href="&url.rfc;2109">RFC 2109</link> provides the
normative
+ <link xlink:href="&url.rfc;6265">RFC 6265</link> provides the
normative
reference on how each <function>setcookie</function> parameter is
interpreted.
<variablelist>
@@ -115,15 +115,16 @@
<term><parameter>domain</parameter></term>
<listitem>
<para>
- The domain that the cookie is available to. To make the cookie
- available on all subdomains of example.com (including example.com
- itself) then you'd set it to <literal>'.example.com'</literal>.
- Although some browsers will accept cookies without the initial
- <literal>.</literal>, <link xlink:href="&url.rfc;2109">RFC
2109</link>
- requires it to be included. Setting the domain to
- <literal>'www.example.com'</literal> or
- <literal>'.www.example.com'</literal> will make the cookie only
- available in the <literal>www</literal> subdomain.
+ The domain that the cookie is available to. Setting the domain to
+ <literal>'www.example.com'</literal> will make the cookie
+ available in the <literal>www</literal> subdomain and higher subdomains.
+ Cookies available to a lower domain, such as
+ <literal>'example.com'</literal> will be available to higher
subdomains,
+ such as <literal>'www.example.com'</literal>.
+
+ Older browsers still implementing the deprecated
+ <link xlink:href="&url.rfc;2109">RFC 2109</link> may require a
leading
+ <literal>.</literal> to match all subdomains.
</para>
</listitem>
</varlistentry>
@@ -181,7 +182,7 @@
setcookie("TestCookie", $value);
setcookie("TestCookie", $value, time()+3600); /* expire in 1 hour */
-setcookie("TestCookie", $value, time()+3600, "/~rasmus/",
".example.com", 1);
+setcookie("TestCookie", $value, time()+3600, "/~rasmus/",
"example.com", 1);
?>
]]>
</programlisting>
@@ -225,7 +226,7 @@
<?php
// set the expiration date to one hour ago
setcookie ("TestCookie", "", time() - 3600);
-setcookie ("TestCookie", "", time() - 3600, "/~rasmus/",
".example.com", 1);
+setcookie ("TestCookie", "", time() - 3600, "/~rasmus/",
"example.com", 1);
?>
]]>
</programlisting>
@@ -371,9 +372,8 @@
<member><function>header</function></member>
<member><function>setrawcookie</function></member>
<member><link linkend="features.cookies">cookies
section</link></member>
- <member><link xlink:href="&spec.cookies;">Original Netscape cookie
specification</link></member>
+ <member><link xlink:href="&url.rfc;6265">RFC
6265</link></member>
<member><link xlink:href="&url.rfc;2109">RFC
2109</link></member>
- <member><link xlink:href="&url.rfc;2965">RFC
2965</link></member>
</simplelist>
</para>
</refsect1>