emacs.d/clones/lisp/www.cliki.net/rfc2109.html
2022-10-07 15:47:14 +02:00

62 lines
No EOL
5.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: rfc2109</title>
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
href="https://www.cliki.net/site/feed/article.atom?title=rfc2109">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - rfc2109</span>
<div id="content"><div id="content-area"><div id="article-title">rfc2109</div><div id="article">rfc2109 (aka cookies1) is a package for dealing with cookies in an <a href="RFC.html" class="category">RFC</a>-compliant way. This is often needed with <a href="Web.html" class="internal">Web</a> programming.<p>License: <a href="BSD.html" class="category">BSD</a> 3-Clause<p>Repository: <a href="https://gitlab.common-lisp.net/rfc2109/rfc2109">https://gitlab.common-lisp.net/rfc2109/rfc2109</a><p>Usage summary:
<div class="code"><span class="nonparen"><span class="paren1">(<span class="nonparen">cookie1:cookie-string <span class="string">"mycookie"</span> <span class="string">"42"</span> <span class="keyword">:max-age</span> <span class="paren2">(<span class="nonparen"><a href="https://www.cliki.net/site/HyperSpec/Body/any_st.html" class="symbol">*</a> 6 24 60 60</span>)</span></span>)</span>
<span class="paren1">(<span class="nonparen">cookie1:parse-cookies <span class="string">"thisis=</span><span class="string">\"</span><span class="string">an old netscape cookie</span><span class="string">\"</span><span class="string">"</span></span>)</span>
<span class="paren1">(<span class="nonparen">cookie1:parse-cookies <span class="string">"$Version=1;thisis=</span><span class="string">\"</span><span class="string">An RFC 2109-style cookie</span><span class="string">\"</span><span class="string">;domain=</span><span class="string">\"</span><span class="string">fake.domain.name</span><span class="string">\"</span><span class="string">"</span></span>)</span></span></div><p>An <a href="araneida.html" class="internal">araneida</a> example is here: <a href="http://paste.lisp.org/display/10504">http://paste.lisp.org/display/10504</a><p>It parses old netscape cookies as well as <a href="RFC.html" class="category">RFC</a> <a href="https://www.ietf.org/rfc/rfc2109.txt">2109</a> cookies.<p>- <a href="Alan&#32;Shields.html" class="internal">Alan Shields</a><p><hr><p>The function cookie-string in this package does not accept a value of zero, even though RFC2109 says it should. Is this a bug or a feature?<p><hr><p>After receiving no reply from Alan, I'm putting up a separate <a href="https://arcocene.org/code/rfc2109/">darcs repo</a> that adds two things to the official one:<p><ul>
<li>Allow zero max-age to allow expiring a cookie.
</li>
<li>Add Netscape's "Expires" attribute which some browsers require for
setting a persistent cookie.
</li>
<li>Support parsing cookie values that contain equals signs ('='). Though against the spec, these exist in the wild, used in e.g. Google AdSense/Analytics.
</li>
</ul><p>There are no other changes. Ideally these changes would be merged to the main tree.<p>Sasha Kovar</div></div>
<div id="footer" class="buttonbar"><ul><li><a href="rfc2109.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=rfc2109">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=rfc2109">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=rfc2109&amp;from-revision=3823444319">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
</div>
<div id="header-buttons" class="buttonbar">
<ul>
<li><a href="https://www.cliki.net/">Home</a></li>
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
<li><a href="CLiki.html">About</a></li>
<li><a href="Text&#32;Formatting.html">Text Formatting</a></li>
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
</ul>
<div id="search">
<form action="https://www.cliki.net/site/search">
<label for="search_query" class="hidden">Search CLiki</label>
<input type="text" name="query" id="search_query" value="" />
<input type="submit" value="search" />
</form>
</div>
</div>
<div id="pageheader">
<div id="header">
<span id="logo">CLiki</span>
<span id="slogan">the common lisp wiki</span>
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
<label for="login_name" class="hidden">Account name</label>
<input type="text" name="name" id="login_name" class="login_input" />
<label for= "login_password" class="hidden">Password</label>
<input type="password" name="password" id="login_password" class="login_input" />
<input type="submit" name="login" value="login" id="login_submit" /><br />
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
</form>
</div>
</div>
</div>
</body></html>