/usr/share/doc/racket/net/head.html is in racket-doc 6.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>8 Headers: Parsing and Constructing</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Net:<span class="mywbr"> </span> Networking Libraries</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="http-client.html" class="tocviewlink" data-pltdoc="x">HTTP Client</a></td></tr><tr><td align="right">2 </td><td><a href="url.html" class="tocviewlink" data-pltdoc="x">URLs and HTTP</a></td></tr><tr><td align="right">3 </td><td><a href="uri-codec.html" class="tocviewlink" data-pltdoc="x">URI Codec:<span class="mywbr"> </span> Encoding and Decoding URIs</a></td></tr><tr><td align="right">4 </td><td><a href="ftp.html" class="tocviewlink" data-pltdoc="x">FTP:<span class="mywbr"> </span> Client</a></td></tr><tr><td align="right">5 </td><td><a href="sendurl.html" class="tocviewlink" data-pltdoc="x">Send URL:<span class="mywbr"> </span> Opening a Web Browser</a></td></tr><tr><td align="right">6 </td><td><a href="smtp.html" class="tocviewlink" data-pltdoc="x">SMTP:<span class="mywbr"> </span> Sending E-<wbr></wbr>Mail</a></td></tr><tr><td align="right">7 </td><td><a href="sendmail.html" class="tocviewlink" data-pltdoc="x"><span class="stt">sendmail</span>:<span class="mywbr"> </span> Sending E-<wbr></wbr>Mail</a></td></tr><tr><td align="right">8 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Headers:<span class="mywbr"> </span> Parsing and Constructing</a></td></tr><tr><td align="right">9 </td><td><a href="unihead.html" class="tocviewlink" data-pltdoc="x">Header Field Encoding</a></td></tr><tr><td align="right">10 </td><td><a href="imap.html" class="tocviewlink" data-pltdoc="x">IMAP:<span class="mywbr"> </span> Reading Mail</a></td></tr><tr><td align="right">11 </td><td><a href="pop3.html" class="tocviewlink" data-pltdoc="x">POP3:<span class="mywbr"> </span> Reading Mail</a></td></tr><tr><td align="right">12 </td><td><a href="mime.html" class="tocviewlink" data-pltdoc="x">MIME:<span class="mywbr"> </span> Decoding Internet Data</a></td></tr><tr><td align="right">13 </td><td><a href="base64.html" class="tocviewlink" data-pltdoc="x">Base 64:<span class="mywbr"> </span> Encoding and Decoding</a></td></tr><tr><td align="right">14 </td><td><a href="qp.html" class="tocviewlink" data-pltdoc="x">Quoted-<wbr></wbr>Printable:<span class="mywbr"> </span> Encoding and Decoding</a></td></tr><tr><td align="right">15 </td><td><a href="dns.html" class="tocviewlink" data-pltdoc="x">DNS:<span class="mywbr"> </span> Domain Name Service Queries</a></td></tr><tr><td align="right">16 </td><td><a href="nntp.html" class="tocviewlink" data-pltdoc="x">NNTP:<span class="mywbr"> </span> Newsgroup Protocol</a></td></tr><tr><td align="right">17 </td><td><a href="tcp.html" class="tocviewlink" data-pltdoc="x">TCP:<span class="mywbr"> </span> Unit and Signature</a></td></tr><tr><td align="right">18 </td><td><a href="tcp-redirect.html" class="tocviewlink" data-pltdoc="x">TCP Redirect:<span class="mywbr"> </span> <span class="RktSym"><span class="RktStxLink">tcp^</span></span> via Channels</a></td></tr><tr><td align="right">19 </td><td><a href="ssl-tcp-unit.html" class="tocviewlink" data-pltdoc="x">SSL Unit:<span class="mywbr"> </span> <span class="RktSym"><span class="RktStxLink">tcp^</span></span> via SSL</a></td></tr><tr><td align="right">20 </td><td><a href="cgi.html" class="tocviewlink" data-pltdoc="x">CGI Scripts</a></td></tr><tr><td align="right">21 </td><td><a href="cookie.html" class="tocviewlink" data-pltdoc="x">Cookie:<span class="mywbr"> </span> Legacy HTTP Client Storage</a></td></tr><tr><td align="right">22 </td><td><a href="git-checkout.html" class="tocviewlink" data-pltdoc="x">Git Repository Checkout</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>8 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Headers:<span class="mywbr"> </span> Parsing and Constructing</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">8.1 </td><td><a href="#%28part._.Functions%29" class="tocviewlink" data-pltdoc="x">Functions</a></td></tr><tr><td align="right">8.2 </td><td><a href="#%28part._.Header_.Unit%29" class="tocviewlink" data-pltdoc="x">Header Unit</a></td></tr><tr><td align="right">8.3 </td><td><a href="#%28part._.Header_.Signature%29" class="tocviewlink" data-pltdoc="x">Header Signature</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">8.1<tt> </tt></span><a href="#%28part._.Functions%29" class="tocsubseclink" data-pltdoc="x">Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._empty-header%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">empty-<wbr></wbr>header</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._validate-header%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">validate-<wbr></wbr>header</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-field%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">extract-<wbr></wbr>field</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-all-fields%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">extract-<wbr></wbr>all-<wbr></wbr>fields</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._remove-field%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">remove-<wbr></wbr>field</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._insert-field%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">insert-<wbr></wbr>field</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._replace-field%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">replace-<wbr></wbr>field</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._append-headers%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">append-<wbr></wbr>headers</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._standard-message-header%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">standard-<wbr></wbr>message-<wbr></wbr>header</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._data-lines-~3edata%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">data-<wbr></wbr>lines-<wbr></wbr>>data</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">extract-<wbr></wbr>addresses</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._assemble-address-field%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">assemble-<wbr></wbr>address-<wbr></wbr>field</span></span></a></td></tr><tr><td><span class="tocsublinknumber">8.2<tt> </tt></span><a href="#%28part._.Header_.Unit%29" class="tocsubseclink" data-pltdoc="x">Header Unit</a></td></tr><tr><td><a href="#%28def._%28%28lib._net%2Fhead-unit..rkt%29._head~40%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">head@</span></span></a></td></tr><tr><td><span class="tocsublinknumber">8.3<tt> </tt></span><a href="#%28part._.Header_.Signature%29" class="tocsubseclink" data-pltdoc="x">Header Signature</a></td></tr><tr><td><a href="#%28form._%28%28lib._net%2Fhead-sig..rkt%29._head~5e%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">head^</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.3", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">top</a></span><span class="navright"> <a href="sendmail.html" title="backward to "7 sendmail: Sending E-Mail"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Net: Networking Libraries"" data-pltdoc="x">up</a> <a href="unihead.html" title="forward to "9 Header Field Encoding"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "net/scribblings/net.scrbl")" x-source-pkg="net-doc" x-part-tag=""head"">8<tt> </tt><a name="(part._head)"></a><a name="(mod-path._net/head)"></a>Headers: Parsing and Constructing</h3><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/head</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/head</span></a> module provides
utilities for parsing and constructing RFC 822 headers
[<a href="doc-bibliography.html#%28cite._.R.F.C822%29" data-pltdoc="x">RFC822</a>], which are used in protocols such as HTTP, SMTP, and
NNTP.</div></p><p>A <a name="(tech._header)"></a><span style="font-style: italic">header</span> is represented as a string or byte string
containing CRLF-delimited lines. Each field within the header spans
one or more lines. In addition, the header ends with two CRLFs
(because the first one terminates the last field, and the second
terminates the header).</p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-source-pkg="net-doc" x-part-tag=""Functions"">8.1<tt> </tt><a name="(part._.Functions)"></a>Functions</h4><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._net/head..rkt)._empty-header))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._empty-header%29%29" class="RktValDef RktValLink" data-pltdoc="x">empty-header</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">The string <span class="RktVal">"\r\n\r\n"</span>, which corresponds to the empty header.
This value is useful for building up headers with
<span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._insert-field%29%29" class="RktValLink" data-pltdoc="x">insert-field</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._append-headers%29%29" class="RktValLink" data-pltdoc="x">append-headers</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._validate-header))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._validate-header%29%29" class="RktValDef RktValLink" data-pltdoc="x">validate-header</a></span></span><span class="hspace"> </span><span class="RktVar">candidate</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=void.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._void%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">candidate</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._or%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">or</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Checks that <span class="RktVar">candidate</span> matches RFC 822. If it does not, an
exception is raised.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._extract-field))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-field%29%29" class="RktValDef RktValLink" data-pltdoc="x">extract-field</a></span></span><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span><span class="RktVar">header</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the header content for the specified field, or <span class="RktVal">#f</span> if
the field is not in the header. The <span class="RktVar">field</span> string should not
end with <span class="RktVal">":"</span>, and it is used case-insensitively. The returned
string will not contain the field name, color separator, or CRLF
terminator for the field; however, if the field spans multiple lines,
the CRLFs separating the lines will be intact.</div></p><p>The <span class="RktVar">field</span> and <span class="RktVar">header</span> arguments must be both strings
or both byte strings, and the result (if not <span class="RktVal">#f</span>) is of the
same type.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-field%29%29" class="RktValLink" data-pltdoc="x">extract-field</a></span><span class="hspace"> </span><span class="RktVal">"TO"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._insert-field%29%29" class="RktValLink" data-pltdoc="x">insert-field</a></span><span class="hspace"> </span><span class="RktVal">"to"</span><span class="hspace"> </span><span class="RktVal">"me@localhost"</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._empty-header%29%29" class="RktValLink" data-pltdoc="x">empty-header</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">"me@localhost"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._extract-all-fields))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-all-fields%29%29" class="RktValDef RktValLink" data-pltdoc="x">extract-all-fields</a></span></span><span class="hspace"> </span><span class="RktVar">header</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._cons%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">cons/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an association-list version of the header; the case of the
field names is preserved, as well as the order and duplicate uses of a
field name.</div></p><p>The result provides strings if <span class="RktVar">header</span> is a string, byte
strings if <span class="RktVar">header</span> is a byte string.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._remove-field))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._remove-field%29%29" class="RktValDef RktValLink" data-pltdoc="x">remove-field</a></span></span><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span><span class="RktVar">header</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new header by removing the specified field from
<span class="RktVar">header</span> (or the first instance of the field, if it occurs
multiple times). If the field is not in <span class="RktVar">header</span>, then the
return value is <span class="RktVar">header</span>.</div></p><p>The <span class="RktVar">field</span> and <span class="RktVar">header</span> arguments must be both strings
or both byte strings, and the result is of the same type.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._insert-field))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._insert-field%29%29" class="RktValDef RktValLink" data-pltdoc="x">insert-field</a></span></span><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span><span class="RktVar">value</span><span class="hspace"> </span><span class="RktVar">header</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">value</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a new header by prefixing the given <span class="RktVar">header</span> with the
given <span class="RktVar">field</span>-<span class="RktVar">value</span> pair. The <span class="RktVar">value</span> string
should not contain a terminating CRLF, but a multi-line value (perhaps
created with <span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._data-lines-~3edata%29%29" class="RktValLink" data-pltdoc="x">data-lines->data</a></span>) may contain separator CRLFs.</div></p><p>The <span class="RktVar">field</span>, <span class="RktVar">value</span>, and <span class="RktVar">header</span> arguments must
be all strings or all byte strings, and the result is of the same
type.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._replace-field))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._replace-field%29%29" class="RktValDef RktValLink" data-pltdoc="x">replace-field</a></span></span><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span><span class="RktVar">value</span><span class="hspace"> </span><span class="RktVar">header</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">field</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">value</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._false%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">false/c</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Composes <span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._remove-field%29%29" class="RktValLink" data-pltdoc="x">remove-field</a></span> and (if <span class="RktVar">value</span> is not
<span class="RktVal">#f</span>) <span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._insert-field%29%29" class="RktValLink" data-pltdoc="x">insert-field</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._append-headers))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._append-headers%29%29" class="RktValDef RktValLink" data-pltdoc="x">append-headers</a></span></span><span class="hspace"> </span><span class="RktVar">header1</span><span class="hspace"> </span><span class="RktVar">header2</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header1</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">header2</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=bytestrings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._bytes%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Appends two headers.</div></p><p>The <span class="RktVar">header1</span> and <span class="RktVar">header2</span> arguments must be both
strings or both byte strings, and the result is of the same type.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._standard-message-header))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._standard-message-header%29%29" class="RktValDef RktValLink" data-pltdoc="x">standard-message-header</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">from</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">to</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">cc</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">bcc</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">subject</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">from</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">to</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">cc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">bcc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">subject</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a standard mail header given the sender, various lists of
recipients, a subject. A <span class="RktVal">"Date"</span> field is added to the header
automatically, using the current time.</div></p><p>The BCC recipients do not actually appear in the header, but they’re
accepted anyway to complete the abstraction.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._data-lines-~3edata))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._data-lines-~3edata%29%29" class="RktValDef RktValLink" data-pltdoc="x">data-lines->data</a></span></span><span class="hspace"> </span><span class="RktVar">listof</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">listof</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Merges multiple lines for a single field value into one string,
adding CRLF-TAB separators.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._extract-addresses))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValDef RktValLink" data-pltdoc="x">extract-addresses</a></span></span><span class="hspace"> </span><span class="RktVar">line</span><span class="hspace"> </span><span class="RktVar">kind</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._list%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">list/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">line</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">kind</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._one-of%252Fc%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">one-of/c</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">name</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">address</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">full</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">all</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Parses <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string</a></span> as a list of comma-delimited mail addresses,
raising an exception if the list is ill-formed. This procedure can be
used for single-address strings, in which case the returned list
contains only one address.</div></p><p>The <span class="RktVar">kind</span> argument specifies which portion of an address
should be returned:</p><ul><li><p><span class="RktVal">'</span><span class="RktVal">name</span> —<wbr></wbr> the free-form name in the address, or the
address itself if no name is available.</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"John Doe <doe@localhost>"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">name</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("John Doe")</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"doe@localhost (Johnny Doe)"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">name</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("Johnny Doe")</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"doe@localhost"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">name</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("doe@localhost")</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">" \"Doe, John\" <doe@localhost>, jane"</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">name</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'("\"Doe, John\"" "jane")</span></p></td></tr></table></blockquote></td></tr></table></li><li><p><span class="RktVal">'</span><span class="RktVal">address</span> —<wbr></wbr> just the mailing address, without any free-form
names.</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"John Doe <doe@localhost>"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">address</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("doe@localhost")</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"doe@localhost (Johnny Doe)"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">address</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("doe@localhost")</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"doe@localhost"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">address</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("doe@localhost")</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">" \"Doe, John\" <doe@localhost>, jane"</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">address</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'("doe@localhost" "jane")</span></p></td></tr></table></blockquote></td></tr></table></li><li><p><span class="RktVal">'</span><span class="RktVal">full</span> —<wbr></wbr> the full address, essentially as it appears in the
input, but normalized.</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"John Doe</span><span class="hspace"> </span><span class="RktVal">< doe@localhost >"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">full</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("John Doe <doe@localhost>")</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"</span><span class="hspace"> </span><span class="RktVal">doe@localhost</span><span class="hspace"> </span><span class="RktVal">(Johnny Doe)"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">full</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("doe@localhost (Johnny Doe)")</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"doe@localhost"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">full</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("doe@localhost")</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">" \"Doe, John\" <doe@localhost>, jane"</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">full</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'("\"Doe, John\" <doe@localhost>" "jane")</span></p></td></tr></table></blockquote></td></tr></table></li><li><p><span class="RktVal">'</span><span class="RktVal">all</span> —<wbr></wbr> a list containing each of the three possibilities:
free-form name, address, and full address (in that
order).</p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"John Doe <doe@localhost>"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">all</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(("John Doe" "doe@localhost" "John Doe <doe@localhost>"))</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"doe@localhost (Johnny Doe)"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">all</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(("Johnny Doe" "doe@localhost" "doe@localhost (Johnny Doe)"))</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">"doe@localhost"</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">all</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(("doe@localhost" "doe@localhost" "doe@localhost"))</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">r</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._extract-addresses%29%29" class="RktValLink" data-pltdoc="x">extract-addresses</a></span><span class="hspace"> </span><span class="RktVal">" \"John\" <doe@localhost>, jane"</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">all</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._length%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">length</a></span><span class="hspace"> </span><span class="RktSym">r</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._car%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">car</a></span><span class="hspace"> </span><span class="RktSym">r</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("\"John\"" "doe@localhost" "\"John\" <doe@localhost>")</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cadr%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">cadr</a></span><span class="hspace"> </span><span class="RktSym">r</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'("jane" "jane" "jane")</span></p></td></tr></table></blockquote></td></tr></table></li></ul><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._net/head..rkt)._assemble-address-field))"></a><span title="Provided from: net/head | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._assemble-address-field%29%29" class="RktValDef RktValLink" data-pltdoc="x">assemble-address-field</a></span></span><span class="hspace"> </span><span class="RktVar">addrs</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">addrs</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.3" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a header field value from a list of addresses. The addresses
are comma-separated, and possibly broken into multiple lines.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead..rkt%29._assemble-address-field%29%29" class="RktValLink" data-pltdoc="x">assemble-address-field</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">"doe@localhost"</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">"Jane <jane@elsewhere>"</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">"doe@localhost, Jane <jane@elsewhere>"</span></p></td></tr></table></blockquote></td></tr></table></p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-source-pkg="net-doc" x-part-tag=""Header_Unit"">8.2<tt> </tt><a name="(part._.Header_.Unit)"></a><a name="(mod-path._net/head-unit)"></a>Header Unit</h4><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead-unit..rkt%29._head~40%29%29" class="RktValLink" data-pltdoc="x">head@</a></span> and <span class="RktSym"><a href="#%28form._%28%28lib._net%2Fhead-sig..rkt%29._head~5e%29%29" class="RktStxLink" data-pltdoc="x">head^</a></span> are deprecated.
They exist for backward-compatibility and will likely be removed in
the future. New code should use the <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/head</span></a> module.</p></blockquote></blockquote></blockquote><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Fhead-unit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/head-unit</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">compatibility-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._net/head-unit..rkt)._head~40))"></a><span title="Provided from: net/head-unit | Package: compatibility-lib"><span class="RktSym"><a href="#%28def._%28%28lib._net%2Fhead-unit..rkt%29._head~40%29%29" class="RktValDef RktValLink" data-pltdoc="x">head@</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym">unit?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Imports nothing, exports <span class="RktSym"><a href="#%28form._%28%28lib._net%2Fhead-sig..rkt%29._head~5e%29%29" class="RktStxLink" data-pltdoc="x">head^</a></span>.</div></p><h4 x-source-module="(lib "net/scribblings/net.scrbl")" x-source-pkg="net-doc" x-part-tag=""Header_Signature"">8.3<tt> </tt><a name="(part._.Header_.Signature)"></a><a name="(mod-path._net/head-sig)"></a>Header Signature</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.3/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.3" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._net%2Fhead-sig%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/head-sig</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">compatibility-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>signature</p></div></div><p class="RForeground"><a name="(form._((lib._net/head-sig..rkt)._head~5e))"></a><span title="Provided from: net/head-sig | Package: compatibility-lib"><span class="RktSym"><a href="#%28form._%28%28lib._net%2Fhead-sig..rkt%29._head~5e%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">head^</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span>signature</p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="leftindent"></blockquote></div></p><p>Includes everything exported by the <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">net/head</span></a> module.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.3", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.3");">top</a></span><span class="navright"> <a href="sendmail.html" title="backward to "7 sendmail: Sending E-Mail"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "Net: Networking Libraries"" data-pltdoc="x">up</a> <a href="unihead.html" title="forward to "9 Header Field Encoding"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|