refred.html 3.7 KB

1234567891011121314
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>ne_redirect_register</title><link rel="stylesheet" type="text/css" href="manual.css"><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="neon HTTP/WebDAV client library"><link rel="up" href="ref.html" title="neon API reference"><link rel="prev" href="refreqtarget.html" title="ne_get_request_target"><link rel="next" href="refauth.html" title="ne_set_server_auth"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ne_redirect_register</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="refreqtarget.html">Prev</a> </td><th width="60%" align="center">neon API reference</th><td width="20%" align="right"> <a accesskey="n" href="refauth.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="refred"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>ne_redirect_register, ne_redirect_location — HTTP request redirect handling</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;ne_redirect.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">ne_redirect_register</b>(</code></td><td>ne_session *<var class="pdparam">sess</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">const ne_uri *<b class="fsfunc">ne_redirect_location</b>(</code></td><td>ne_session *<var class="pdparam">sess</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id3655"></a><h2>Description</h2><p>The <em class="type">ne_redirect_register</em> function registers
  2. redirect handling for the session. If a valid redirect (with
  3. status code 3xx) response is processed, the request will fail
  4. with the <code class="literal">NE_REDIRECT</code> error code. The
  5. destination of the redirect can then be retrieved using
  6. <code class="function">ne_redirect_location</code>.</p><p>If a redirect was processed, the
  7. <em class="type">ne_redirect_location</em> function returns the
  8. destination URI of the redirect.</p></div><div class="refsect1"><a name="id3663"></a><h2>Return value</h2><p><code class="function">ne_redirect_location</code> returns
  9. <code class="literal">NULL</code> if no request has yet been processed,
  10. if the current request was not a redirect, or if the
  11. destination of the redirect could not be parsed or
  12. resolved. Otherwise it returns a pointer to an
  13. <em class="type">ne_uri</em> object, which remains valid until another
  14. request is created for the session.</p></div><div class="refsect1"><a name="id3669"></a><h2>See also</h2><p><a class="xref" href="refsess.html#ne_session_create">ne_session_create</a>.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="refreqtarget.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ref.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="refauth.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ne_get_request_target </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> ne_set_server_auth</td></tr></table></div></body></html>