<html> <head> <link rel="stylesheet" type="text/css" href="dox.css" /> <title>libapreq2-2.13: libapreq2: include/apreq_cookie.h File Reference</title> </head> <body> <div id="page-header"> <p class="menu"> <a href="http://www.apache.org/">Apache Software Foundation</a> > <a href="http://httpd.apache.org">HTTP Server Project</a> > <a href="http://httpd.apache.org/apreq/">Request Library Subproject</a></p> <p class="apache">Apache HTTP Server Request Library</p> <img alt="" src="feather.gif" /></div> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> </div> <div class="contents"> <h1>include/apreq_cookie.h File Reference</h1>Cookies and Jars.<p> <a class="el" href="apreq__cookie_8h.html" title="Cookies and Jars.apreq_cookie.h describes a common server-side API for request (incoming)...">apreq_cookie.h</a> describes a common server-side API for request (incoming) and response (outgoing) cookies. It aims towards compliance with the standard cookie specifications listed below. <a href="#_details">More...</a> <p> <code>#include "<a class="el" href="apreq_8h-source.html">apreq.h</a>"</code><br> <code>#include "<a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/apr__time_8h.html">apr_time.h</a>"</code><br> <p> <a href="apreq__cookie_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Cookie type, supporting both Netscape and RFC cookie specifications. <a href="structapreq__cookie__t.html#_details">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Defines</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#681b8ef60cad05e684876d4dd2be043b">APREQ_COOKIE_MAX_LENGTH</a> 4096</td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#b69d56f31d7c8f6f6f598a133817b46e">apreq_value_to_cookie</a> (const char *val)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#04eaee766e51f143ff2ca4d8a0107004">apreq_cookie_version</a> (const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE void </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#eff5b05ca6b935dd61dcc9da1a047546">apreq_cookie_version_set</a> (<a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c, unsigned v)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#7553c7f54497ce30e1828082c98c813e">apreq_cookie_is_secure</a> (const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE void </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#1df7a1ba35cf4c47fc907f40b95fe5e4">apreq_cookie_secure_on</a> (<a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE void </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#d9f4813b99b80801ba1dc11d0099ac10">apreq_cookie_secure_off</a> (<a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#61c3709414b9fe614e32587da8ee8e8a">apreq_cookie_is_httponly</a> (const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE void </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#a9a94a9b03dea7b286a9c4041d3c7e4e">apreq_cookie_httponly_on</a> (<a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE void </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#619cc2d56e20134e91bf1d31ab26bfec">apreq_cookie_httponly_off</a> (<a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#08618139ba29e98cd2327de3f0e961fe">apreq_cookie_is_tainted</a> (const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE void </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#feec2e0802ae883d4f2fda750b74ca55">apreq_cookie_tainted_on</a> (<a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static APR_INLINE void </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#c3b777e9709fa062ff978afef3867964">apreq_cookie_tainted_off</a> (<a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__errno.html#gf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#113be08c01bc82605ec52d80c054cbf6">apreq_parse_cookie_header</a> (<a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__pools.html#gf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *pool, <a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__tables.html#gd7ea82d6608a4a633fc3775694ab71e4">apr_table_t</a> *jar, const char *header)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#53b5bb02baf7fb318cd643fb55820422">apreq_cookie_make</a> (<a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__pools.html#gf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *pool, const char *name, const <a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__platform.html#gaa72b2253f6f3032cefea5712a27540e">apr_size_t</a> nlen, const char *value, const <a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__platform.html#gaa72b2253f6f3032cefea5712a27540e">apr_size_t</a> vlen)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#10c1d6639303c3f85fb5818d88e654d3">apreq_cookie_as_string</a> (const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c, <a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__pools.html#gf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> *p)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#fc06d8f5e4ee8530013c4f3c3b12e01f">apreq_cookie_serialize</a> (const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c, char *buf, <a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__platform.html#gaa72b2253f6f3032cefea5712a27540e">apr_size_t</a> len)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="apreq__cookie_8h.html#8c6eb3c7c0f003bdc150d2ce99dacc7f">apreq_cookie_expires</a> (<a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> *c, const char *time_str)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Cookies and Jars.<p> <a class="el" href="apreq__cookie_8h.html" title="Cookies and Jars.apreq_cookie.h describes a common server-side API for request (incoming)...">apreq_cookie.h</a> describes a common server-side API for request (incoming) and response (outgoing) cookies. It aims towards compliance with the standard cookie specifications listed below. <p> <dl class="see" compact><dt><b>See also:</b></dt><dd><a href="http://wp.netscape.com/newsref/std/cookie_spec.html">http://wp.netscape.com/newsref/std/cookie_spec.html</a> <p> <a href="http://www.ietf.org/rfc/rfc2109.txt">http://www.ietf.org/rfc/rfc2109.txt</a> <p> <a href="http://www.ietf.org/rfc/rfc2964.txt">http://www.ietf.org/rfc/rfc2964.txt</a> <p> <a href="http://www.ietf.org/rfc/rfc2965.txt">http://www.ietf.org/rfc/rfc2965.txt</a> </dd></dl> <hr><h2>Define Documentation</h2> <a class="anchor" name="681b8ef60cad05e684876d4dd2be043b"></a><!-- doxytag: member="apreq_cookie.h::APREQ_COOKIE_MAX_LENGTH" ref="681b8ef60cad05e684876d4dd2be043b" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">#define APREQ_COOKIE_MAX_LENGTH 4096 </td> </tr> </table> </div> <div class="memdoc"> <p> This macro is deprecated.<p> Maximum length of a single Set-Cookie(2) header. </div> </div><p> <hr><h2>Function Documentation</h2> <a class="anchor" name="10c1d6639303c3f85fb5818d88e654d3"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_as_string" ref="10c1d6639303c3f85fb5818d88e654d3" args="(const apreq_cookie_t *c, apr_pool_t *p)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">char* apreq_cookie_as_string </td> <td>(</td> <td class="paramtype">const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__pools.html#gf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td> <td class="paramname"> <em>p</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Returns a string that represents the cookie as it would appear in a valid "Set-Cookie*" header.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>cookie. </td></tr> <tr><td valign="top"></td><td valign="top"><em>p</em> </td><td>pool which allocates the returned string.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>header string. </dd></dl> </div> </div><p> <a class="anchor" name="8c6eb3c7c0f003bdc150d2ce99dacc7f"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_expires" ref="8c6eb3c7c0f003bdc150d2ce99dacc7f" args="(apreq_cookie_t *c, const char *time_str)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void apreq_cookie_expires </td> <td>(</td> <td class="paramtype"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>time_str</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Set the Cookie's expiration date.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>The cookie. </td></tr> <tr><td valign="top"></td><td valign="top"><em>time_str</em> </td><td>If NULL, the Cookie's expiration date is unset, making it a session cookie. This means no "expires" or "max-age" attribute will appear in the cookie's serialized form. If time_str is not NULL, the expiration date will be reset to the offset (from now) represented by time_str. The time_str should be in a format that <a class="el" href="apreq__util_8h.html#4e838a92724aa7d9be0b978dc5c4e50c">apreq_atoi64t()</a> can understand, namely /[+-]?\d+\s*[YMDhms]/.</td></tr> </table> </dl> <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Now time_str may also be a fixed date; see <a class="elRef" doxygen="apu.tag:http://apr.apache.org/docs/apr-util/1.3/" href="http://apr.apache.org/docs/apr-util/1.3/group___a_p_r___util___date.html#ga6d4a18ff9f40c37c0f145d063c50e96">apr_date_parse_rfc()</a> for admissible formats. </dd></dl> </div> </div><p> <a class="anchor" name="619cc2d56e20134e91bf1d31ab26bfec"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_httponly_off" ref="619cc2d56e20134e91bf1d31ab26bfec" args="(apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE void apreq_cookie_httponly_off </td> <td>(</td> <td class="paramtype"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Turns off the cookie's HttpOnly flag. </div> </div><p> <a class="anchor" name="a9a94a9b03dea7b286a9c4041d3c7e4e"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_httponly_on" ref="a9a94a9b03dea7b286a9c4041d3c7e4e" args="(apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE void apreq_cookie_httponly_on </td> <td>(</td> <td class="paramtype"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Sets the cookie's HttpOnly flag, meaning it is not accessible through client-side script in supported browsers. </div> </div><p> <a class="anchor" name="61c3709414b9fe614e32587da8ee8e8a"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_is_httponly" ref="61c3709414b9fe614e32587da8ee8e8a" args="(const apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE unsigned apreq_cookie_is_httponly </td> <td>(</td> <td class="paramtype">const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>1 if the HttpOnly flag is set, 0 otherwise. </dd></dl> </div> </div><p> <a class="anchor" name="7553c7f54497ce30e1828082c98c813e"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_is_secure" ref="7553c7f54497ce30e1828082c98c813e" args="(const apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE unsigned apreq_cookie_is_secure </td> <td>(</td> <td class="paramtype">const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>1 if the secure flag is set, 0 otherwise. </dd></dl> </div> </div><p> <a class="anchor" name="08618139ba29e98cd2327de3f0e961fe"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_is_tainted" ref="08618139ba29e98cd2327de3f0e961fe" args="(const apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE unsigned apreq_cookie_is_tainted </td> <td>(</td> <td class="paramtype">const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>1 if the taint flag is set, 0 otherwise. </dd></dl> </div> </div><p> <a class="anchor" name="53b5bb02baf7fb318cd643fb55820422"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_make" ref="53b5bb02baf7fb318cd643fb55820422" args="(apr_pool_t *pool, const char *name, const apr_size_t nlen, const char *value, const apr_size_t vlen)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a>* apreq_cookie_make </td> <td>(</td> <td class="paramtype"><a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__pools.html#gf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td> <td class="paramname"> <em>pool</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__platform.html#gaa72b2253f6f3032cefea5712a27540e">apr_size_t</a> </td> <td class="paramname"> <em>nlen</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>value</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__platform.html#gaa72b2253f6f3032cefea5712a27540e">apr_size_t</a> </td> <td class="paramname"> <em>vlen</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Returns a new cookie, made from the argument list.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pool</em> </td><td>Pool which allocates the cookie. </td></tr> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>The cookie's name. </td></tr> <tr><td valign="top"></td><td valign="top"><em>nlen</em> </td><td>Length of name. </td></tr> <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>The cookie's value. </td></tr> <tr><td valign="top"></td><td valign="top"><em>vlen</em> </td><td>Length of value.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the new cookie </dd></dl> </div> </div><p> <a class="anchor" name="d9f4813b99b80801ba1dc11d0099ac10"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_secure_off" ref="d9f4813b99b80801ba1dc11d0099ac10" args="(apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE void apreq_cookie_secure_off </td> <td>(</td> <td class="paramtype"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Turns off the cookie's secure flag. </div> </div><p> <a class="anchor" name="1df7a1ba35cf4c47fc907f40b95fe5e4"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_secure_on" ref="1df7a1ba35cf4c47fc907f40b95fe5e4" args="(apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE void apreq_cookie_secure_on </td> <td>(</td> <td class="paramtype"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Sets the cookie's secure flag, meaning it only comes back over an SSL-encrypted connction. </div> </div><p> <a class="anchor" name="fc06d8f5e4ee8530013c4f3c3b12e01f"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_serialize" ref="fc06d8f5e4ee8530013c4f3c3b12e01f" args="(const apreq_cookie_t *c, char *buf, apr_size_t len)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int apreq_cookie_serialize </td> <td>(</td> <td class="paramtype">const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char * </td> <td class="paramname"> <em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__platform.html#gaa72b2253f6f3032cefea5712a27540e">apr_size_t</a> </td> <td class="paramname"> <em>len</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Same functionality as apreq_cookie_as_string. Stores the string representation in buf, using up to len bytes in buf as storage. The return value has the same semantics as that of apr_snprintf, including the special behavior for a "len = 0" argument.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>c</em> </td><td>cookie. </td></tr> <tr><td valign="top"></td><td valign="top"><em>buf</em> </td><td>storage location for the result. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>size of buf's storage area.</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>size of resulting header string. </dd></dl> </div> </div><p> <a class="anchor" name="c3b777e9709fa062ff978afef3867964"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_tainted_off" ref="c3b777e9709fa062ff978afef3867964" args="(apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE void apreq_cookie_tainted_off </td> <td>(</td> <td class="paramtype"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Turns off the cookie's tainted flag. </div> </div><p> <a class="anchor" name="feec2e0802ae883d4f2fda750b74ca55"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_tainted_on" ref="feec2e0802ae883d4f2fda750b74ca55" args="(apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE void apreq_cookie_tainted_on </td> <td>(</td> <td class="paramtype"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Sets the cookie's tainted flag. </div> </div><p> <a class="anchor" name="04eaee766e51f143ff2ca4d8a0107004"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_version" ref="04eaee766e51f143ff2ca4d8a0107004" args="(const apreq_cookie_t *c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE unsigned apreq_cookie_version </td> <td>(</td> <td class="paramtype">const <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>1 if this is an RFC cookie, 0 if its a Netscape cookie. </dd></dl> </div> </div><p> <a class="anchor" name="eff5b05ca6b935dd61dcc9da1a047546"></a><!-- doxytag: member="apreq_cookie.h::apreq_cookie_version_set" ref="eff5b05ca6b935dd61dcc9da1a047546" args="(apreq_cookie_t *c, unsigned v)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE void apreq_cookie_version_set </td> <td>(</td> <td class="paramtype"><a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a> * </td> <td class="paramname"> <em>c</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned </td> <td class="paramname"> <em>v</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Sets the cookie's protocol version. </div> </div><p> <a class="anchor" name="113be08c01bc82605ec52d80c054cbf6"></a><!-- doxytag: member="apreq_cookie.h::apreq_parse_cookie_header" ref="113be08c01bc82605ec52d80c054cbf6" args="(apr_pool_t *pool, apr_table_t *jar, const char *header)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__errno.html#gf76ee4543247e9fb3f3546203e590a6c">apr_status_t</a> apreq_parse_cookie_header </td> <td>(</td> <td class="paramtype"><a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__pools.html#gf137f28edcf9a086cd6bc36c20d7cdfb">apr_pool_t</a> * </td> <td class="paramname"> <em>pool</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="elRef" doxygen="apr.tag:http://apr.apache.org/docs/apr/1.3/" href="http://apr.apache.org/docs/apr/1.3/group__apr__tables.html#gd7ea82d6608a4a633fc3775694ab71e4">apr_table_t</a> * </td> <td class="paramname"> <em>jar</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char * </td> <td class="paramname"> <em>header</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Parse a cookie header and store the cookies in an apr_table_t.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pool</em> </td><td>pool which allocates the cookies </td></tr> <tr><td valign="top"></td><td valign="top"><em>jar</em> </td><td>table where parsed cookies are stored </td></tr> <tr><td valign="top"></td><td valign="top"><em>header</em> </td><td>the header value</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>APR_SUCCESS. <p> <a class="el" href="apreq__error_8h.html#73a69e21acc2cf849310a421ab43d2ba">APREQ_ERROR_BADSEQ</a> if an unparseable character sequence appears. <p> <a class="el" href="apreq__error_8h.html#33080081185585997ef9c5232ec4dd8f">APREQ_ERROR_MISMATCH</a> if an rfc-cookie attribute appears in a netscape cookie header. <p> APR_ENOTIMPL if an unrecognized rfc-cookie attribute appears. <p> <a class="el" href="apreq__error_8h.html#59be3610ba54a58fbb3cd6bb655ff972">APREQ_ERROR_NOTOKEN</a> if a required token was not present. <p> <a class="el" href="apreq__error_8h.html#04b6a01738a1ee7fd1ecc79d256e721f">APREQ_ERROR_BADCHAR</a> if an unexpected token was present. </dd></dl> </div> </div><p> <a class="anchor" name="b69d56f31d7c8f6f6f598a133817b46e"></a><!-- doxytag: member="apreq_cookie.h::apreq_value_to_cookie" ref="b69d56f31d7c8f6f6f598a133817b46e" args="(const char *val)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static APR_INLINE <a class="el" href="structapreq__cookie__t.html">apreq_cookie_t</a>* apreq_value_to_cookie </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>val</em> </td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Upgrades a jar's table values to <a class="el" href="structapreq__cookie__t.html" title="Cookie type, supporting both Netscape and RFC cookie specifications.">apreq_cookie_t</a> structs. </div> </div><p> </div> <div id="footer"> <p class="apache"> Copyright © 2003-2006 <a href="http://www.apache.org">The Apache Software Foundation</a>.<br/> See <a href="apreq_license.html">LICENSE</a>.</p> <p class="menu"> <span style="color:#aaa">page generated by <a href="http://www.doxygen.org/"><code>doxygen</code></a> version 1.5.6 on 25 Nov 2010</span> </p> </div> </body> </html>