\hypertarget{http_8h}{\section{opal/mca/event/libevent2013/libevent/include/event2/http.h File Reference}
\label{http_8h}\index{opal/mca/event/libevent2013/libevent/include/event2/http.\+h@{opal/mca/event/libevent2013/libevent/include/event2/http.\+h}}
}


Basic support for H\+T\+T\+P serving.  


{\ttfamily \#include $<$event2/util.\+h$>$}\\*
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{http_8h_a02e6d59009dee759528ec81fc9a8eeff}{\#define \hyperlink{http_8h_a02e6d59009dee759528ec81fc9a8eeff}{H\+T\+T\+P\+\_\+\+O\+K}~200}\label{http_8h_a02e6d59009dee759528ec81fc9a8eeff}

\begin{DoxyCompactList}\small\item\em request completed ok \end{DoxyCompactList}\item 
\hypertarget{http_8h_ac5e3a483119375a05d199c30709f2b8e}{\#define \hyperlink{http_8h_ac5e3a483119375a05d199c30709f2b8e}{H\+T\+T\+P\+\_\+\+N\+O\+C\+O\+N\+T\+E\+N\+T}~204}\label{http_8h_ac5e3a483119375a05d199c30709f2b8e}

\begin{DoxyCompactList}\small\item\em request does not have content \end{DoxyCompactList}\item 
\hypertarget{http_8h_ac6ffbb7b69889f1eee0d413576c609a9}{\#define \hyperlink{http_8h_ac6ffbb7b69889f1eee0d413576c609a9}{H\+T\+T\+P\+\_\+\+M\+O\+V\+E\+P\+E\+R\+M}~301}\label{http_8h_ac6ffbb7b69889f1eee0d413576c609a9}

\begin{DoxyCompactList}\small\item\em the uri moved permanently \end{DoxyCompactList}\item 
\hypertarget{http_8h_a7d2a7341ba2af15babe8c25df67e563f}{\#define \hyperlink{http_8h_a7d2a7341ba2af15babe8c25df67e563f}{H\+T\+T\+P\+\_\+\+M\+O\+V\+E\+T\+E\+M\+P}~302}\label{http_8h_a7d2a7341ba2af15babe8c25df67e563f}

\begin{DoxyCompactList}\small\item\em the uri moved temporarily \end{DoxyCompactList}\item 
\hypertarget{http_8h_a3112d58297965db46a04fe288bf1d0da}{\#define \hyperlink{http_8h_a3112d58297965db46a04fe288bf1d0da}{H\+T\+T\+P\+\_\+\+N\+O\+T\+M\+O\+D\+I\+F\+I\+E\+D}~304}\label{http_8h_a3112d58297965db46a04fe288bf1d0da}

\begin{DoxyCompactList}\small\item\em page was not modified from last \end{DoxyCompactList}\item 
\hypertarget{http_8h_af9f070802de32cd2f820059fc42cbf39}{\#define \hyperlink{http_8h_af9f070802de32cd2f820059fc42cbf39}{H\+T\+T\+P\+\_\+\+B\+A\+D\+R\+E\+Q\+U\+E\+S\+T}~400}\label{http_8h_af9f070802de32cd2f820059fc42cbf39}

\begin{DoxyCompactList}\small\item\em invalid http request was made \end{DoxyCompactList}\item 
\hypertarget{http_8h_a1f5b9c02b018640c890e5f27207fa6c0}{\#define \hyperlink{http_8h_a1f5b9c02b018640c890e5f27207fa6c0}{H\+T\+T\+P\+\_\+\+N\+O\+T\+F\+O\+U\+N\+D}~404}\label{http_8h_a1f5b9c02b018640c890e5f27207fa6c0}

\begin{DoxyCompactList}\small\item\em could not find content for uri \end{DoxyCompactList}\item 
\hypertarget{http_8h_a8d93bc2b08ddc194c213682c4726b0e6}{\#define \hyperlink{http_8h_a8d93bc2b08ddc194c213682c4726b0e6}{H\+T\+T\+P\+\_\+\+B\+A\+D\+M\+E\+T\+H\+O\+D}~405}\label{http_8h_a8d93bc2b08ddc194c213682c4726b0e6}

\begin{DoxyCompactList}\small\item\em method not allowed for this uri \end{DoxyCompactList}\item 
\hypertarget{http_8h_a64236d9bad703199d84a08bee90e00f0}{\#define {\bfseries H\+T\+T\+P\+\_\+\+E\+N\+T\+I\+T\+Y\+T\+O\+O\+L\+A\+R\+G\+E}~413}\label{http_8h_a64236d9bad703199d84a08bee90e00f0}

\item 
\hypertarget{http_8h_a4eac9f52d3d8de9b3deadaec6ad0bee9}{\#define \hyperlink{http_8h_a4eac9f52d3d8de9b3deadaec6ad0bee9}{H\+T\+T\+P\+\_\+\+E\+X\+P\+E\+C\+T\+A\+T\+I\+O\+N\+F\+A\+I\+L\+E\+D}~417}\label{http_8h_a4eac9f52d3d8de9b3deadaec6ad0bee9}

\begin{DoxyCompactList}\small\item\em we can't handle this expectation \end{DoxyCompactList}\item 
\hypertarget{http_8h_a15eac402986428a8125d364b7ae569b1}{\#define \hyperlink{http_8h_a15eac402986428a8125d364b7ae569b1}{H\+T\+T\+P\+\_\+\+I\+N\+T\+E\+R\+N\+A\+L}~500}\label{http_8h_a15eac402986428a8125d364b7ae569b1}

\begin{DoxyCompactList}\small\item\em internal error \end{DoxyCompactList}\item 
\hypertarget{http_8h_a9759dd4ad026a688142afb7b4e4542cc}{\#define \hyperlink{http_8h_a9759dd4ad026a688142afb7b4e4542cc}{H\+T\+T\+P\+\_\+\+N\+O\+T\+I\+M\+P\+L\+E\+M\+E\+N\+T\+E\+D}~501}\label{http_8h_a9759dd4ad026a688142afb7b4e4542cc}

\begin{DoxyCompactList}\small\item\em not implemented \end{DoxyCompactList}\item 
\hypertarget{http_8h_a5fd6829fe2bb38dd13288f11dcb2025f}{\#define \hyperlink{http_8h_a5fd6829fe2bb38dd13288f11dcb2025f}{H\+T\+T\+P\+\_\+\+S\+E\+R\+V\+U\+N\+A\+V\+A\+I\+L}~503}\label{http_8h_a5fd6829fe2bb38dd13288f11dcb2025f}

\begin{DoxyCompactList}\small\item\em the server is not available \end{DoxyCompactList}\item 
\#define \hyperlink{http_8h_ace576911d436a163584f4942907270a5}{E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+\+N\+O\+N\+C\+O\+N\+F\+O\+R\+M\+A\+N\+T}~0x01
\begin{DoxyCompactList}\small\item\em Tolerate U\+R\+Is that do not conform to R\+F\+C3986. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{http_8h_ac858319d667267f9fc848c2bb6931aa3}{evhttp\+\_\+cmd\+\_\+type} \{ \\*
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+G\+E\+T} = 1 $<$$<$ 0, 
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+P\+O\+S\+T} = 1 $<$$<$ 1, 
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+H\+E\+A\+D} = 1 $<$$<$ 2, 
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+P\+U\+T} = 1 $<$$<$ 3, 
\\*
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+D\+E\+L\+E\+T\+E} = 1 $<$$<$ 4, 
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+O\+P\+T\+I\+O\+N\+S} = 1 $<$$<$ 5, 
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+T\+R\+A\+C\+E} = 1 $<$$<$ 6, 
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+C\+O\+N\+N\+E\+C\+T} = 1 $<$$<$ 7, 
\\*
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+P\+A\+T\+C\+H} = 1 $<$$<$ 8
 \}
\begin{DoxyCompactList}\small\item\em The different request types supported by evhttp. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a47ca41a942899d019bf59cf32301ae4f}{enum \hyperlink{http_8h_a47ca41a942899d019bf59cf32301ae4f}{evhttp\+\_\+request\+\_\+kind} \{ {\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+U\+E\+S\+T}, 
{\bfseries E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+S\+P\+O\+N\+S\+E}
 \}}\label{http_8h_a47ca41a942899d019bf59cf32301ae4f}

\begin{DoxyCompactList}\small\item\em a request object can represent either a request or a reply \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structevhttp}{evhttp} $\ast$ \hyperlink{http_8h_ab8c84271a97fd85957cf72b1161b8216}{evhttp\+\_\+new} (struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$base)
\begin{DoxyCompactList}\small\item\em Create a new H\+T\+T\+P server. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a80ea2b819c0997a0ecc0d915446aeaa4}{evhttp\+\_\+bind\+\_\+socket} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, const char $\ast$address, ev\+\_\+uint16\+\_\+t port)
\begin{DoxyCompactList}\small\item\em Binds an H\+T\+T\+P server on the specified address and port. \end{DoxyCompactList}\item 
struct \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket} $\ast$ \hyperlink{http_8h_a7b2e494399364cfb8071e69564c33db9}{evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, const char $\ast$address, ev\+\_\+uint16\+\_\+t port)
\begin{DoxyCompactList}\small\item\em Like \hyperlink{http_8h_a80ea2b819c0997a0ecc0d915446aeaa4}{evhttp\+\_\+bind\+\_\+socket()}, but returns a handle for referencing the socket. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_aa5719654012b143ebfc0dfc9d4a8490d}{evhttp\+\_\+accept\+\_\+socket} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} fd)
\begin{DoxyCompactList}\small\item\em Makes an H\+T\+T\+P server accept connections on the specified socket. \end{DoxyCompactList}\item 
struct \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket} $\ast$ \hyperlink{http_8h_ae0b17d7e600e87cadda2352ea2135d8f}{evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} fd)
\begin{DoxyCompactList}\small\item\em Like \hyperlink{http_8h_aa5719654012b143ebfc0dfc9d4a8490d}{evhttp\+\_\+accept\+\_\+socket()}, but returns a handle for referencing the socket. \end{DoxyCompactList}\item 
struct \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket} $\ast$ \hyperlink{http_8h_aa86abe883e71049f03534d984dd8c625}{evhttp\+\_\+bind\+\_\+listener} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, struct \hyperlink{structevconnlistener}{evconnlistener} $\ast$listener)
\begin{DoxyCompactList}\small\item\em The most low-\/level evhttp\+\_\+bind/accept method\+: takes an evconnlistener, and returns an \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket}. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a7b9ba15b143ece0f69a2b4c52ff9d788}{struct \hyperlink{structevconnlistener}{evconnlistener} $\ast$ \hyperlink{http_8h_a7b9ba15b143ece0f69a2b4c52ff9d788}{evhttp\+\_\+bound\+\_\+socket\+\_\+get\+\_\+listener} (struct \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket} $\ast$bound)}\label{http_8h_a7b9ba15b143ece0f69a2b4c52ff9d788}

\begin{DoxyCompactList}\small\item\em Return the listener used to implement a bound socket. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a5404c30f3b50a664f2ec1500ebb30d86}{evhttp\+\_\+del\+\_\+accept\+\_\+socket} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, struct \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket} $\ast$bound\+\_\+socket)
\begin{DoxyCompactList}\small\item\em Makes an H\+T\+T\+P server stop accepting connections on the specified socket. \end{DoxyCompactList}\item 
\hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} \hyperlink{http_8h_a5b5912e3d764bbd8f4952aba0f0604fa}{evhttp\+\_\+bound\+\_\+socket\+\_\+get\+\_\+fd} (struct \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket} $\ast$bound\+\_\+socket)
\begin{DoxyCompactList}\small\item\em Get the raw file descriptor referenced by an \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket}. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a849acf0f233772b486b8057fcf3aaf4a}{evhttp\+\_\+free} (struct \hyperlink{structevhttp}{evhttp} $\ast$http)
\begin{DoxyCompactList}\small\item\em Free the previously created H\+T\+T\+P server. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_ae936aa6e7b0cb9617d0548a952db93cf}{evhttp\+\_\+set\+\_\+max\+\_\+headers\+\_\+size} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, ev\+\_\+ssize\+\_\+t max\+\_\+headers\+\_\+size)
\begin{DoxyCompactList}\small\item\em X\+X\+X Document. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a8406065dcb34f9a058b2a7a6988ac351}{evhttp\+\_\+set\+\_\+max\+\_\+body\+\_\+size} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, ev\+\_\+ssize\+\_\+t max\+\_\+body\+\_\+size)
\begin{DoxyCompactList}\small\item\em X\+X\+X Document. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_ae63a0370f59570e00753f7fb512a7f59}{evhttp\+\_\+set\+\_\+allowed\+\_\+methods} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, ev\+\_\+uint16\+\_\+t methods)
\begin{DoxyCompactList}\small\item\em Sets the what H\+T\+T\+P methods are supported in requests accepted by this server, and passed to user callbacks. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a5b685afe43d7f4c3bfcc7dcba72d41e0}{evhttp\+\_\+set\+\_\+cb} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, const char $\ast$path, void($\ast$cb)(struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$, void $\ast$), void $\ast$cb\+\_\+arg)
\begin{DoxyCompactList}\small\item\em Set a callback for a specified U\+R\+I. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a26b24365ab036cbce853fedc7818bc49}{int \hyperlink{http_8h_a26b24365ab036cbce853fedc7818bc49}{evhttp\+\_\+del\+\_\+cb} (struct \hyperlink{structevhttp}{evhttp} $\ast$, const char $\ast$)}\label{http_8h_a26b24365ab036cbce853fedc7818bc49}

\begin{DoxyCompactList}\small\item\em Removes the callback for a specified U\+R\+I. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_ad3466287c0054d32dfd538a3bdfb0374}{evhttp\+\_\+set\+\_\+gencb} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, void($\ast$cb)(struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$, void $\ast$), void $\ast$arg)
\begin{DoxyCompactList}\small\item\em Set a callback for all requests that are not caught by specific callbacks. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a82d8fb72c5e8c76b787987ba5de5b141}{evhttp\+\_\+add\+\_\+virtual\+\_\+host} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, const char $\ast$pattern, struct \hyperlink{structevhttp}{evhttp} $\ast$vhost)
\begin{DoxyCompactList}\small\item\em Adds a virtual host to the http server. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_ab2eb1ac82f36e7f0180b18d4553d3994}{evhttp\+\_\+remove\+\_\+virtual\+\_\+host} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, struct \hyperlink{structevhttp}{evhttp} $\ast$vhost)
\begin{DoxyCompactList}\small\item\em Removes a virtual host from the http server. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a58fe001925e7f65d7678bf90b31fc2a5}{evhttp\+\_\+add\+\_\+server\+\_\+alias} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, const char $\ast$alias)
\begin{DoxyCompactList}\small\item\em Add a server alias to an http object. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a88fe4c5507e88c4db284ea30a0478e5d}{evhttp\+\_\+remove\+\_\+server\+\_\+alias} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, const char $\ast$alias)
\begin{DoxyCompactList}\small\item\em Remove a server alias from an http object. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_acc8bb4d9e196f957510b5db9f6a02e44}{evhttp\+\_\+set\+\_\+timeout} (struct \hyperlink{structevhttp}{evhttp} $\ast$http, int timeout\+\_\+in\+\_\+secs)
\begin{DoxyCompactList}\small\item\em Set the timeout for an H\+T\+T\+P request. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a629ef7f70ed916e162dee3bd12e397c9}{evhttp\+\_\+send\+\_\+error} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req, int error, const char $\ast$reason)
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} an H\+T\+M\+L error message to the client. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a9df5ec9adc9bc664db5d6b161a293525}{evhttp\+\_\+send\+\_\+reply} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req, int code, const char $\ast$reason, struct \hyperlink{structevbuffer}{evbuffer} $\ast$databuf)
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} an H\+T\+M\+L reply to the client. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a69c93aab46133521997cdfb8c2e07195}{evhttp\+\_\+send\+\_\+reply\+\_\+start} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req, int code, const char $\ast$reason)
\begin{DoxyCompactList}\small\item\em Initiate a reply that uses Transfer-\/\+Encoding chunked. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a7950f70e66678fda56fdf8288811639c}{evhttp\+\_\+send\+\_\+reply\+\_\+chunk} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req, struct \hyperlink{structevbuffer}{evbuffer} $\ast$databuf)
\begin{DoxyCompactList}\small\item\em \hyperlink{structSend}{Send} another data chunk as part of an ongoing chunked reply. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a77024706313626c5857089b08ec5e0ae}{evhttp\+\_\+send\+\_\+reply\+\_\+end} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)
\begin{DoxyCompactList}\small\item\em Complete a chunked reply. \end{DoxyCompactList}\item 
struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$ \hyperlink{http_8h_a2f40f147e37f9a40f8ef684fb8f2d6b0}{evhttp\+\_\+request\+\_\+new} (void($\ast$cb)(struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$, void $\ast$), void $\ast$arg)
\begin{DoxyCompactList}\small\item\em Creates a new request object that needs to be filled in with the request parameters. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a3dd375d81eac9baabc53749ed025ec12}{evhttp\+\_\+request\+\_\+set\+\_\+chunked\+\_\+cb} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$, void($\ast$cb)(struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$, void $\ast$))
\begin{DoxyCompactList}\small\item\em Enable delivery of chunks to requestor. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_aad0392c873fa034be3ff09d4f8b68aba}{evhttp\+\_\+request\+\_\+free} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)
\begin{DoxyCompactList}\small\item\em Frees the request object and removes associated events. \end{DoxyCompactList}\item 
struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$ \hyperlink{http_8h_af5913a2851880df25cf9ef43f7646074}{evhttp\+\_\+connection\+\_\+base\+\_\+new} (struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$base, struct \hyperlink{structevdns__base}{evdns\+\_\+base} $\ast$dnsbase, const char $\ast$address, unsigned short port)
\begin{DoxyCompactList}\small\item\em A connection object that can be used to for making H\+T\+T\+P requests. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a93a13d12f579bf22af35e2f1a6d82f4c}{evhttp\+\_\+request\+\_\+own} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)
\begin{DoxyCompactList}\small\item\em Takes ownership of the request object. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a25516c0fb1b0ef47c81f623da3782bd1}{int \hyperlink{http_8h_a25516c0fb1b0ef47c81f623da3782bd1}{evhttp\+\_\+request\+\_\+is\+\_\+owned} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_a25516c0fb1b0ef47c81f623da3782bd1}

\begin{DoxyCompactList}\small\item\em Returns 1 if the request is owned by the user. \end{DoxyCompactList}\item 
struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$ \hyperlink{http_8h_a92a534f00172fa452c45c9f3fc42d6f5}{evhttp\+\_\+request\+\_\+get\+\_\+connection} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)
\begin{DoxyCompactList}\small\item\em Returns the connection object associated with the request or N\+U\+L\+L. \end{DoxyCompactList}\item 
\hypertarget{http_8h_aeeec8fa8b1c5836d05a0e552793b0945}{struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$ \hyperlink{http_8h_aeeec8fa8b1c5836d05a0e552793b0945}{evhttp\+\_\+connection\+\_\+get\+\_\+base} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$req)}\label{http_8h_aeeec8fa8b1c5836d05a0e552793b0945}

\begin{DoxyCompactList}\small\item\em Returns the underlying \hyperlink{structevent__base}{event\+\_\+base} for this connection. \end{DoxyCompactList}\item 
\hypertarget{http_8h_aeea564828181bbd3879b6af92224d4f6}{void {\bfseries evhttp\+\_\+connection\+\_\+set\+\_\+max\+\_\+headers\+\_\+size} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, ev\+\_\+ssize\+\_\+t new\+\_\+max\+\_\+headers\+\_\+size)}\label{http_8h_aeea564828181bbd3879b6af92224d4f6}

\item 
\hypertarget{http_8h_a05e5fc3a7488c3a32f28fde45d15c6e4}{void {\bfseries evhttp\+\_\+connection\+\_\+set\+\_\+max\+\_\+body\+\_\+size} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, ev\+\_\+ssize\+\_\+t new\+\_\+max\+\_\+body\+\_\+size)}\label{http_8h_a05e5fc3a7488c3a32f28fde45d15c6e4}

\item 
\hypertarget{http_8h_ab5afe0ffd71e479a9d830ac3800ba599}{void \hyperlink{http_8h_ab5afe0ffd71e479a9d830ac3800ba599}{evhttp\+\_\+connection\+\_\+free} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon)}\label{http_8h_ab5afe0ffd71e479a9d830ac3800ba599}

\begin{DoxyCompactList}\small\item\em Frees an http connection. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a839b6cd03f4377fead26e8b680e9cd7e}{void \hyperlink{http_8h_a839b6cd03f4377fead26e8b680e9cd7e}{evhttp\+\_\+connection\+\_\+set\+\_\+local\+\_\+address} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, const char $\ast$address)}\label{http_8h_a839b6cd03f4377fead26e8b680e9cd7e}

\begin{DoxyCompactList}\small\item\em sets the ip address from which http connections are made \end{DoxyCompactList}\item 
\hypertarget{http_8h_a3a325b818c5c4f48a8ba1f3cf6a49d7f}{void \hyperlink{http_8h_a3a325b818c5c4f48a8ba1f3cf6a49d7f}{evhttp\+\_\+connection\+\_\+set\+\_\+local\+\_\+port} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, ev\+\_\+uint16\+\_\+t port)}\label{http_8h_a3a325b818c5c4f48a8ba1f3cf6a49d7f}

\begin{DoxyCompactList}\small\item\em sets the local port from which http connections are made \end{DoxyCompactList}\item 
\hypertarget{http_8h_aa145623b7f58efe51908c6e48060db8c}{void \hyperlink{http_8h_aa145623b7f58efe51908c6e48060db8c}{evhttp\+\_\+connection\+\_\+set\+\_\+timeout} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, int timeout\+\_\+in\+\_\+secs)}\label{http_8h_aa145623b7f58efe51908c6e48060db8c}

\begin{DoxyCompactList}\small\item\em Sets the timeout for events related to this connection. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a9356b2a28a3b08bf273d027d1c40f470}{void \hyperlink{http_8h_a9356b2a28a3b08bf273d027d1c40f470}{evhttp\+\_\+connection\+\_\+set\+\_\+retries} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, int retry\+\_\+max)}\label{http_8h_a9356b2a28a3b08bf273d027d1c40f470}

\begin{DoxyCompactList}\small\item\em Sets the retry limit for this connection -\/ -\/1 repeats indefinitely. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_af62e12b843002e6eace204cc68da2277}{evhttp\+\_\+connection\+\_\+set\+\_\+closecb} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, void($\ast$)(struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$, void $\ast$), void $\ast$)
\begin{DoxyCompactList}\small\item\em Set a callback for connection close. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_afa866e15c757e815a2e66cba7c8aa161}{evhttp\+\_\+connection\+\_\+get\+\_\+peer} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, char $\ast$$\ast$address, ev\+\_\+uint16\+\_\+t $\ast$port)
\begin{DoxyCompactList}\small\item\em Get the remote address and port associated with this connection. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a70af2a5e67da78782e06c640b9f85d4e}{evhttp\+\_\+make\+\_\+request} (struct \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} $\ast$evcon, struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req, enum \hyperlink{http_8h_ac858319d667267f9fc848c2bb6931aa3}{evhttp\+\_\+cmd\+\_\+type} type, const char $\ast$uri)
\begin{DoxyCompactList}\small\item\em Make an H\+T\+T\+P request over the specified connection. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_ab323fe297168f0f87af832f2bddc40a0}{evhttp\+\_\+cancel\+\_\+request} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)
\begin{DoxyCompactList}\small\item\em Cancels a pending H\+T\+T\+P request. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a78ce0bb30083afddb525cb9fa0b30ae0}{const char $\ast$ \hyperlink{http_8h_a78ce0bb30083afddb525cb9fa0b30ae0}{evhttp\+\_\+request\+\_\+get\+\_\+uri} (const struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_a78ce0bb30083afddb525cb9fa0b30ae0}

\begin{DoxyCompactList}\small\item\em Returns the request U\+R\+I. \end{DoxyCompactList}\item 
\hypertarget{http_8h_af6e023c86959c317464e2f2ac2fdb2d7}{const struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$ \hyperlink{http_8h_af6e023c86959c317464e2f2ac2fdb2d7}{evhttp\+\_\+request\+\_\+get\+\_\+evhttp\+\_\+uri} (const struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_af6e023c86959c317464e2f2ac2fdb2d7}

\begin{DoxyCompactList}\small\item\em Returns the request U\+R\+I (parsed) \end{DoxyCompactList}\item 
\hypertarget{http_8h_a552bcfe23acec6858742e44a1b932dad}{enum \hyperlink{http_8h_ac858319d667267f9fc848c2bb6931aa3}{evhttp\+\_\+cmd\+\_\+type} \hyperlink{http_8h_a552bcfe23acec6858742e44a1b932dad}{evhttp\+\_\+request\+\_\+get\+\_\+command} (const struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_a552bcfe23acec6858742e44a1b932dad}

\begin{DoxyCompactList}\small\item\em Returns the request command. \end{DoxyCompactList}\item 
\hypertarget{http_8h_ac1452ea8db0ddb07f52d5de739f026af}{int {\bfseries evhttp\+\_\+request\+\_\+get\+\_\+response\+\_\+code} (const struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_ac1452ea8db0ddb07f52d5de739f026af}

\item 
\hypertarget{http_8h_a034fca99ce0cc5ff3b7f56744915a8be}{struct evkeyvalq $\ast$ \hyperlink{http_8h_a034fca99ce0cc5ff3b7f56744915a8be}{evhttp\+\_\+request\+\_\+get\+\_\+input\+\_\+headers} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_a034fca99ce0cc5ff3b7f56744915a8be}

\begin{DoxyCompactList}\small\item\em Returns the input headers. \end{DoxyCompactList}\item 
\hypertarget{http_8h_ae1321a89525b6336fce624e28de41b49}{struct evkeyvalq $\ast$ \hyperlink{http_8h_ae1321a89525b6336fce624e28de41b49}{evhttp\+\_\+request\+\_\+get\+\_\+output\+\_\+headers} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_ae1321a89525b6336fce624e28de41b49}

\begin{DoxyCompactList}\small\item\em Returns the output headers. \end{DoxyCompactList}\item 
\hypertarget{http_8h_aa939f28c8da2a8122097de23c7670321}{struct \hyperlink{structevbuffer}{evbuffer} $\ast$ \hyperlink{http_8h_aa939f28c8da2a8122097de23c7670321}{evhttp\+\_\+request\+\_\+get\+\_\+input\+\_\+buffer} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_aa939f28c8da2a8122097de23c7670321}

\begin{DoxyCompactList}\small\item\em Returns the input buffer. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a8dc23de32b242457db98ab566c53f71f}{struct \hyperlink{structevbuffer}{evbuffer} $\ast$ \hyperlink{http_8h_a8dc23de32b242457db98ab566c53f71f}{evhttp\+\_\+request\+\_\+get\+\_\+output\+\_\+buffer} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)}\label{http_8h_a8dc23de32b242457db98ab566c53f71f}

\begin{DoxyCompactList}\small\item\em Returns the output buffer. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{http_8h_aac84865e4848b8d9089e4182e12d185e}{evhttp\+\_\+request\+\_\+get\+\_\+host} (struct \hyperlink{structevhttp__request}{evhttp\+\_\+request} $\ast$req)
\begin{DoxyCompactList}\small\item\em Returns the host associated with the request. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{http_8h_a3a36842fd6f74977c9c0fb7aa5578832}{evhttp\+\_\+find\+\_\+header} (const struct evkeyvalq $\ast$headers, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Finds the value belonging to a header. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_ab87600f14a6f8c36beedbeed8267b856}{evhttp\+\_\+remove\+\_\+header} (struct evkeyvalq $\ast$headers, const char $\ast$key)
\begin{DoxyCompactList}\small\item\em Removes a header from a list of existing headers. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a04e3f41c14b8e0e74da13a8d308b93b7}{evhttp\+\_\+add\+\_\+header} (struct evkeyvalq $\ast$headers, const char $\ast$key, const char $\ast$value)
\begin{DoxyCompactList}\small\item\em Adds a header to a list of existing headers. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_adfd33f73c8d7af63a0da05ebb32b7e72}{evhttp\+\_\+clear\+\_\+headers} (struct evkeyvalq $\ast$headers)
\begin{DoxyCompactList}\small\item\em Removes all headers from the header list. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{http_8h_a2b6d14272efe8d5f6bb110666a2032fd}{evhttp\+\_\+encode\+\_\+uri} (const char $\ast$str)
\begin{DoxyCompactList}\small\item\em Helper function to encode a string for inclusion in a U\+R\+I. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{http_8h_ab64229249a981ccfea09161a199972da}{evhttp\+\_\+uriencode} (const char $\ast$str, ev\+\_\+ssize\+\_\+t size, int space\+\_\+to\+\_\+plus)
\begin{DoxyCompactList}\small\item\em As evhttp\+\_\+encode\+\_\+uri, but if 'size' is nonnegative, treat the string as being 'size' bytes long. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{http_8h_a681a8e967dec9f73fb8e27f465fdae4b}{evhttp\+\_\+decode\+\_\+uri} (const char $\ast$uri)
\begin{DoxyCompactList}\small\item\em Helper function to sort of decode a U\+R\+I-\/encoded string. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{http_8h_ac2914389616f04199aded10444fd8e42}{evhttp\+\_\+uridecode} (const char $\ast$uri, int decode\+\_\+plus, size\+\_\+t $\ast$size\+\_\+out)
\begin{DoxyCompactList}\small\item\em Helper function to decode a U\+R\+I-\/escaped string or H\+T\+T\+P parameter. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a12d3940d23fb53c38106f8ac0d3dfff6}{evhttp\+\_\+parse\+\_\+query} (const char $\ast$uri, struct evkeyvalq $\ast$headers)
\begin{DoxyCompactList}\small\item\em Helper function to parse out arguments in a query. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a1598fb5757f39dde6dc43dee9a2e7fca}{evhttp\+\_\+parse\+\_\+query\+\_\+str} (const char $\ast$uri, struct evkeyvalq $\ast$headers)
\begin{DoxyCompactList}\small\item\em Helper function to parse out arguments from the query portion of an H\+T\+T\+P U\+R\+I. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{http_8h_ac9318bd77cb5f4030b434bea99b3828e}{evhttp\+\_\+htmlescape} (const char $\ast$html)
\begin{DoxyCompactList}\small\item\em Escape H\+T\+M\+L character entities in a string. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a2847be10a24befd3c65d412690475110}{struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$ \hyperlink{http_8h_a2847be10a24befd3c65d412690475110}{evhttp\+\_\+uri\+\_\+new} (void)}\label{http_8h_a2847be10a24befd3c65d412690475110}

\begin{DoxyCompactList}\small\item\em Return a new empty \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} with no fields set. \end{DoxyCompactList}\item 
void \hyperlink{http_8h_aea0b990f1ca5ba71feffa96c8f6bd06b}{evhttp\+\_\+uri\+\_\+set\+\_\+flags} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, unsigned flags)
\begin{DoxyCompactList}\small\item\em Changes the flags set on a given U\+R\+I. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{http_8h_a6f49cc20f421d2f66907c613d24ad3dc}{evhttp\+\_\+uri\+\_\+get\+\_\+scheme} (const struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri)
\begin{DoxyCompactList}\small\item\em Return the scheme of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or N\+U\+L\+L if there is no scheme has been set and the \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} contains a Relative-\/\+Ref. \end{DoxyCompactList}\item 
\hypertarget{http_8h_adfc9eeca8691a9f55dad523e60f1a467}{const char $\ast$ \hyperlink{http_8h_adfc9eeca8691a9f55dad523e60f1a467}{evhttp\+\_\+uri\+\_\+get\+\_\+userinfo} (const struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri)}\label{http_8h_adfc9eeca8691a9f55dad523e60f1a467}

\begin{DoxyCompactList}\small\item\em Return the userinfo part of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or N\+U\+L\+L if it has no userinfo set. \end{DoxyCompactList}\item 
const char $\ast$ \hyperlink{http_8h_a2d45134ab552432fbe25eb2ff646f906}{evhttp\+\_\+uri\+\_\+get\+\_\+host} (const struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri)
\begin{DoxyCompactList}\small\item\em Return the host part of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or N\+U\+L\+L if it has no host set. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a60d456504f4f93f61384eb0b526f5a4c}{evhttp\+\_\+uri\+\_\+get\+\_\+port} (const struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri)
\begin{DoxyCompactList}\small\item\em Return the port part of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or -\/1 if there is no port set. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a49e685022515780b3dfb4d944b4cce4d}{const char $\ast$ \hyperlink{http_8h_a49e685022515780b3dfb4d944b4cce4d}{evhttp\+\_\+uri\+\_\+get\+\_\+path} (const struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri)}\label{http_8h_a49e685022515780b3dfb4d944b4cce4d}

\begin{DoxyCompactList}\small\item\em Return the path part of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or N\+U\+L\+L if it has no path set. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a9a8c53b664a23dbdebd99d768a17590e}{const char $\ast$ \hyperlink{http_8h_a9a8c53b664a23dbdebd99d768a17590e}{evhttp\+\_\+uri\+\_\+get\+\_\+query} (const struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri)}\label{http_8h_a9a8c53b664a23dbdebd99d768a17590e}

\begin{DoxyCompactList}\small\item\em Return the query part of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} (excluding the leading \char`\"{}?\char`\"{}), or N\+U\+L\+L if it has no query set. \end{DoxyCompactList}\item 
\hypertarget{http_8h_ad7fcd64c02bb074bc9c754e8107550c1}{const char $\ast$ \hyperlink{http_8h_ad7fcd64c02bb074bc9c754e8107550c1}{evhttp\+\_\+uri\+\_\+get\+\_\+fragment} (const struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri)}\label{http_8h_ad7fcd64c02bb074bc9c754e8107550c1}

\begin{DoxyCompactList}\small\item\em Return the fragment part of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} (excluding the leading \char`\"{}\#\char`\"{}), or N\+U\+L\+L if it has no fragment set. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_abf5f82fb9c8f8df0b1b4c73691791dd5}{evhttp\+\_\+uri\+\_\+set\+\_\+scheme} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, const char $\ast$scheme)
\begin{DoxyCompactList}\small\item\em Set the scheme of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the scheme if scheme==N\+U\+L\+L. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_ac7b10b8ef8ee94d14674f9329486d355}{evhttp\+\_\+uri\+\_\+set\+\_\+userinfo} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, const char $\ast$userinfo)
\begin{DoxyCompactList}\small\item\em Set the userinfo of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the userinfo if userinfo==N\+U\+L\+L. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a103c447efb9f41a5897b3aa130424734}{evhttp\+\_\+uri\+\_\+set\+\_\+host} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, const char $\ast$host)
\begin{DoxyCompactList}\small\item\em Set the host of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the host if host==N\+U\+L\+L. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a8cc430f9b8fb4c6aa11692d5ef0b383c}{evhttp\+\_\+uri\+\_\+set\+\_\+port} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, int port)
\begin{DoxyCompactList}\small\item\em Set the port of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the port if port==-\/1. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_ae6bbfc5cf62df674ba72800ea46c5828}{evhttp\+\_\+uri\+\_\+set\+\_\+path} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, const char $\ast$path)
\begin{DoxyCompactList}\small\item\em Set the path of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the path if path==N\+U\+L\+L. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_aaf999637136bc1785e5d75c191c671ba}{evhttp\+\_\+uri\+\_\+set\+\_\+query} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, const char $\ast$query)
\begin{DoxyCompactList}\small\item\em Set the query of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the query if query==N\+U\+L\+L. \end{DoxyCompactList}\item 
int \hyperlink{http_8h_a36b844028058c82b6709d1e0fe7e1cf9}{evhttp\+\_\+uri\+\_\+set\+\_\+fragment} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, const char $\ast$fragment)
\begin{DoxyCompactList}\small\item\em Set the fragment of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the fragment if fragment==N\+U\+L\+L. \end{DoxyCompactList}\item 
struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$ \hyperlink{http_8h_ad9f9447cb1c3c92e40478b98ff30db60}{evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags} (const char $\ast$source\+\_\+uri, unsigned flags)
\begin{DoxyCompactList}\small\item\em Helper function to parse a U\+R\+I-\/\+Reference as specified by R\+F\+C3986. \end{DoxyCompactList}\item 
\hypertarget{http_8h_a47bc072177c8e839083c511a618a422c}{struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$ \hyperlink{http_8h_a47bc072177c8e839083c511a618a422c}{evhttp\+\_\+uri\+\_\+parse} (const char $\ast$source\+\_\+uri)}\label{http_8h_a47bc072177c8e839083c511a618a422c}

\begin{DoxyCompactList}\small\item\em Alias for evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags(source\+\_\+uri, 0) \end{DoxyCompactList}\item 
void \hyperlink{http_8h_a5ee82311278b8fda3ed93a8e358683bb}{evhttp\+\_\+uri\+\_\+free} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri)
\begin{DoxyCompactList}\small\item\em Free all memory allocated for a parsed uri. \end{DoxyCompactList}\item 
char $\ast$ \hyperlink{http_8h_a60f7217fccc2bdfb9cb6abeb1c4ad102}{evhttp\+\_\+uri\+\_\+join} (struct \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} $\ast$uri, char $\ast$buf, size\+\_\+t limit)
\begin{DoxyCompactList}\small\item\em Join together the uri parts from parsed data to form a U\+R\+I-\/\+Reference. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Basic support for H\+T\+T\+P serving. 

As Libevent is a library for dealing with event notification and most interesting applications are networked today, I have often found the need to write H\+T\+T\+P code. The following prototypes and definitions provide an application with a minimal interface for making H\+T\+T\+P requests and for creating a very simple H\+T\+T\+P server. 

\subsection{Macro Definition Documentation}
\hypertarget{http_8h_ace576911d436a163584f4942907270a5}{\index{http.\+h@{http.\+h}!E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+\+N\+O\+N\+C\+O\+N\+F\+O\+R\+M\+A\+N\+T@{E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+\+N\+O\+N\+C\+O\+N\+F\+O\+R\+M\+A\+N\+T}}
\index{E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+\+N\+O\+N\+C\+O\+N\+F\+O\+R\+M\+A\+N\+T@{E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+\+N\+O\+N\+C\+O\+N\+F\+O\+R\+M\+A\+N\+T}!http.\+h@{http.\+h}}
\subsubsection[{E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+\+N\+O\+N\+C\+O\+N\+F\+O\+R\+M\+A\+N\+T}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+\+N\+O\+N\+C\+O\+N\+F\+O\+R\+M\+A\+N\+T~0x01}}\label{http_8h_ace576911d436a163584f4942907270a5}


Tolerate U\+R\+Is that do not conform to R\+F\+C3986. 

Unfortunately, some H\+T\+T\+P clients generate U\+R\+Is that, according to R\+F\+C3986, are not conformant U\+R\+Is. If you need to support these U\+R\+Is, you can do so by passing this flag to evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags.

Currently, these changes are\+: 
\begin{DoxyItemize}
\item Nonconformant U\+R\+Is are allowed to contain otherwise unreasonable characters in their path, query, and fragment components. 
\end{DoxyItemize}

\subsection{Enumeration Type Documentation}
\hypertarget{http_8h_ac858319d667267f9fc848c2bb6931aa3}{\index{http.\+h@{http.\+h}!evhttp\+\_\+cmd\+\_\+type@{evhttp\+\_\+cmd\+\_\+type}}
\index{evhttp\+\_\+cmd\+\_\+type@{evhttp\+\_\+cmd\+\_\+type}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+cmd\+\_\+type}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf evhttp\+\_\+cmd\+\_\+type}}}\label{http_8h_ac858319d667267f9fc848c2bb6931aa3}


The different request types supported by evhttp. 

These are as specified in R\+F\+C2616, except for P\+A\+T\+C\+H which is specified by R\+F\+C5789.

By default, only some of these methods are accepted and passed to user callbacks; use \hyperlink{http_8h_ae63a0370f59570e00753f7fb512a7f59}{evhttp\+\_\+set\+\_\+allowed\+\_\+methods()} to change which methods are allowed. 

\subsection{Function Documentation}
\hypertarget{http_8h_aa5719654012b143ebfc0dfc9d4a8490d}{\index{http.\+h@{http.\+h}!evhttp\+\_\+accept\+\_\+socket@{evhttp\+\_\+accept\+\_\+socket}}
\index{evhttp\+\_\+accept\+\_\+socket@{evhttp\+\_\+accept\+\_\+socket}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+accept\+\_\+socket}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+accept\+\_\+socket (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{fd}
\end{DoxyParamCaption}
)}}\label{http_8h_aa5719654012b143ebfc0dfc9d4a8490d}


Makes an H\+T\+T\+P server accept connections on the specified socket. 

This may be useful to create a socket and then fork multiple instances of an http server, or when a socket has been communicated via file descriptor passing in situations where an http servers does not have permissions to bind to a low-\/numbered port.

Can be called multiple times to have the http server listen to multiple different sockets.


\begin{DoxyParams}{Parameters}
{\em http} & a pointer to an evhttp object \\
\hline
{\em fd} & a socket fd that is ready for accepting connections \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a80ea2b819c0997a0ecc0d915446aeaa4}{evhttp\+\_\+bind\+\_\+socket()} 
\end{DoxySeeAlso}


References evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle().

\hypertarget{http_8h_ae0b17d7e600e87cadda2352ea2135d8f}{\index{http.\+h@{http.\+h}!evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle@{evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle}}
\index{evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle@{evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evhttp\+\_\+bound\+\_\+socket}$\ast$ evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{fd}
\end{DoxyParamCaption}
)}}\label{http_8h_ae0b17d7e600e87cadda2352ea2135d8f}


Like \hyperlink{http_8h_aa5719654012b143ebfc0dfc9d4a8490d}{evhttp\+\_\+accept\+\_\+socket()}, but returns a handle for referencing the socket. 

The returned pointer is not valid after {\itshape http} is freed.


\begin{DoxyParams}{Parameters}
{\em http} & a pointer to an evhttp object \\
\hline
{\em fd} & a socket fd that is ready for accepting connections \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Handle for the socket on success, N\+U\+L\+L on failure. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_aa5719654012b143ebfc0dfc9d4a8490d}{evhttp\+\_\+accept\+\_\+socket()}, \hyperlink{http_8h_a5404c30f3b50a664f2ec1500ebb30d86}{evhttp\+\_\+del\+\_\+accept\+\_\+socket()} 
\end{DoxySeeAlso}


References evhttp\+\_\+bind\+\_\+listener().



Referenced by evhttp\+\_\+accept\+\_\+socket(), and evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle().

\hypertarget{http_8h_a04e3f41c14b8e0e74da13a8d308b93b7}{\index{http.\+h@{http.\+h}!evhttp\+\_\+add\+\_\+header@{evhttp\+\_\+add\+\_\+header}}
\index{evhttp\+\_\+add\+\_\+header@{evhttp\+\_\+add\+\_\+header}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+add\+\_\+header}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+add\+\_\+header (
\begin{DoxyParamCaption}
\item[{struct evkeyvalq $\ast$}]{headers, }
\item[{const char $\ast$}]{key, }
\item[{const char $\ast$}]{value}
\end{DoxyParamCaption}
)}}\label{http_8h_a04e3f41c14b8e0e74da13a8d308b93b7}


Adds a header to a list of existing headers. 


\begin{DoxyParams}{Parameters}
{\em headers} & the evkeyvalq object to which to add a header \\
\hline
{\em key} & the name of the header \\
\hline
{\em value} & the value belonging to the header \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 otherwise. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a3a36842fd6f74977c9c0fb7aa5578832}{evhttp\+\_\+find\+\_\+header()}, \hyperlink{http_8h_adfd33f73c8d7af63a0da05ebb32b7e72}{evhttp\+\_\+clear\+\_\+headers()} 
\end{DoxySeeAlso}


Referenced by evhttp\+\_\+send\+\_\+reply\+\_\+start().

\hypertarget{http_8h_a58fe001925e7f65d7678bf90b31fc2a5}{\index{http.\+h@{http.\+h}!evhttp\+\_\+add\+\_\+server\+\_\+alias@{evhttp\+\_\+add\+\_\+server\+\_\+alias}}
\index{evhttp\+\_\+add\+\_\+server\+\_\+alias@{evhttp\+\_\+add\+\_\+server\+\_\+alias}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+add\+\_\+server\+\_\+alias}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+add\+\_\+server\+\_\+alias (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{const char $\ast$}]{alias}
\end{DoxyParamCaption}
)}}\label{http_8h_a58fe001925e7f65d7678bf90b31fc2a5}


Add a server alias to an http object. 

The http object can be a virtual host or the main server.


\begin{DoxyParams}{Parameters}
{\em http} & the evhttp object \\
\hline
{\em alias} & the alias to add \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
evhttp\+\_\+add\+\_\+remove\+\_\+alias() 
\end{DoxySeeAlso}
\hypertarget{http_8h_a82d8fb72c5e8c76b787987ba5de5b141}{\index{http.\+h@{http.\+h}!evhttp\+\_\+add\+\_\+virtual\+\_\+host@{evhttp\+\_\+add\+\_\+virtual\+\_\+host}}
\index{evhttp\+\_\+add\+\_\+virtual\+\_\+host@{evhttp\+\_\+add\+\_\+virtual\+\_\+host}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+add\+\_\+virtual\+\_\+host}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+add\+\_\+virtual\+\_\+host (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{const char $\ast$}]{pattern, }
\item[{struct {\bf evhttp} $\ast$}]{vhost}
\end{DoxyParamCaption}
)}}\label{http_8h_a82d8fb72c5e8c76b787987ba5de5b141}


Adds a virtual host to the http server. 

A virtual host is a newly initialized evhttp object that has request callbacks set on it via \hyperlink{http_8h_a5b685afe43d7f4c3bfcc7dcba72d41e0}{evhttp\+\_\+set\+\_\+cb()} or \hyperlink{http_8h_ad3466287c0054d32dfd538a3bdfb0374}{evhttp\+\_\+set\+\_\+gencb()}. It most not have any listing sockets associated with it.

If the virtual host has not been removed by the time that \hyperlink{http_8h_a849acf0f233772b486b8057fcf3aaf4a}{evhttp\+\_\+free()} is called on the main http server, it will be automatically freed, too.

It is possible to have hierarchical vhosts. For example\+: A vhost with the pattern $\ast$.example.\+com may have other vhosts with patterns foo.\+example.\+com and bar.\+example.\+com associated with it.


\begin{DoxyParams}{Parameters}
{\em http} & the evhttp object to which to add a virtual host \\
\hline
{\em pattern} & the glob pattern against which the hostname is matched. The match is case insensitive and follows otherwise regular shell matching. \\
\hline
{\em vhost} & the virtual host to add the regular http server. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_ab2eb1ac82f36e7f0180b18d4553d3994}{evhttp\+\_\+remove\+\_\+virtual\+\_\+host()} 
\end{DoxySeeAlso}
\hypertarget{http_8h_aa86abe883e71049f03534d984dd8c625}{\index{http.\+h@{http.\+h}!evhttp\+\_\+bind\+\_\+listener@{evhttp\+\_\+bind\+\_\+listener}}
\index{evhttp\+\_\+bind\+\_\+listener@{evhttp\+\_\+bind\+\_\+listener}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+bind\+\_\+listener}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evhttp\+\_\+bound\+\_\+socket}$\ast$ evhttp\+\_\+bind\+\_\+listener (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{struct {\bf evconnlistener} $\ast$}]{listener}
\end{DoxyParamCaption}
)}}\label{http_8h_aa86abe883e71049f03534d984dd8c625}


The most low-\/level evhttp\+\_\+bind/accept method\+: takes an evconnlistener, and returns an \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket}. 

The listener will be freed when the bound socket is freed. 

Referenced by evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle().

\hypertarget{http_8h_a80ea2b819c0997a0ecc0d915446aeaa4}{\index{http.\+h@{http.\+h}!evhttp\+\_\+bind\+\_\+socket@{evhttp\+\_\+bind\+\_\+socket}}
\index{evhttp\+\_\+bind\+\_\+socket@{evhttp\+\_\+bind\+\_\+socket}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+bind\+\_\+socket}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+bind\+\_\+socket (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{const char $\ast$}]{address, }
\item[{ev\+\_\+uint16\+\_\+t}]{port}
\end{DoxyParamCaption}
)}}\label{http_8h_a80ea2b819c0997a0ecc0d915446aeaa4}


Binds an H\+T\+T\+P server on the specified address and port. 

Can be called multiple times to bind the same http server to multiple different ports.


\begin{DoxyParams}{Parameters}
{\em http} & a pointer to an evhttp object \\
\hline
{\em address} & a string containing the I\+P address to listen(2) on \\
\hline
{\em port} & the port number to listen on \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_aa5719654012b143ebfc0dfc9d4a8490d}{evhttp\+\_\+accept\+\_\+socket()} 
\end{DoxySeeAlso}


References evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle().



Referenced by evhttp\+\_\+start().

\hypertarget{http_8h_a7b2e494399364cfb8071e69564c33db9}{\index{http.\+h@{http.\+h}!evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle@{evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle}}
\index{evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle@{evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evhttp\+\_\+bound\+\_\+socket}$\ast$ evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{const char $\ast$}]{address, }
\item[{ev\+\_\+uint16\+\_\+t}]{port}
\end{DoxyParamCaption}
)}}\label{http_8h_a7b2e494399364cfb8071e69564c33db9}


Like \hyperlink{http_8h_a80ea2b819c0997a0ecc0d915446aeaa4}{evhttp\+\_\+bind\+\_\+socket()}, but returns a handle for referencing the socket. 

The returned pointer is not valid after {\itshape http} is freed.


\begin{DoxyParams}{Parameters}
{\em http} & a pointer to an evhttp object \\
\hline
{\em address} & a string containing the I\+P address to listen(2) on \\
\hline
{\em port} & the port number to listen on \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Handle for the socket on success, N\+U\+L\+L on failure. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a80ea2b819c0997a0ecc0d915446aeaa4}{evhttp\+\_\+bind\+\_\+socket()}, \hyperlink{http_8h_a5404c30f3b50a664f2ec1500ebb30d86}{evhttp\+\_\+del\+\_\+accept\+\_\+socket()} 
\end{DoxySeeAlso}


References evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle(), evutil\+\_\+closesocket(), and evutil\+\_\+socket\+\_\+t.



Referenced by evhttp\+\_\+bind\+\_\+socket().

\hypertarget{http_8h_a5b5912e3d764bbd8f4952aba0f0604fa}{\index{http.\+h@{http.\+h}!evhttp\+\_\+bound\+\_\+socket\+\_\+get\+\_\+fd@{evhttp\+\_\+bound\+\_\+socket\+\_\+get\+\_\+fd}}
\index{evhttp\+\_\+bound\+\_\+socket\+\_\+get\+\_\+fd@{evhttp\+\_\+bound\+\_\+socket\+\_\+get\+\_\+fd}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+bound\+\_\+socket\+\_\+get\+\_\+fd}]{\setlength{\rightskip}{0pt plus 5cm}{\bf evutil\+\_\+socket\+\_\+t} evhttp\+\_\+bound\+\_\+socket\+\_\+get\+\_\+fd (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+bound\+\_\+socket} $\ast$}]{bound\+\_\+socket}
\end{DoxyParamCaption}
)}}\label{http_8h_a5b5912e3d764bbd8f4952aba0f0604fa}


Get the raw file descriptor referenced by an \hyperlink{structevhttp__bound__socket}{evhttp\+\_\+bound\+\_\+socket}. 


\begin{DoxyParams}{Parameters}
{\em bound\+\_\+socket} & a handle returned by evhttp\+\_\+\{bind,accept\}\+\_\+socket\+\_\+with\+\_\+handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the file descriptor used by the bound socket 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a7b2e494399364cfb8071e69564c33db9}{evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle()}, \hyperlink{http_8h_ae0b17d7e600e87cadda2352ea2135d8f}{evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle()} 
\end{DoxySeeAlso}
\hypertarget{http_8h_ab323fe297168f0f87af832f2bddc40a0}{\index{http.\+h@{http.\+h}!evhttp\+\_\+cancel\+\_\+request@{evhttp\+\_\+cancel\+\_\+request}}
\index{evhttp\+\_\+cancel\+\_\+request@{evhttp\+\_\+cancel\+\_\+request}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+cancel\+\_\+request}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+cancel\+\_\+request (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req}
\end{DoxyParamCaption}
)}}\label{http_8h_ab323fe297168f0f87af832f2bddc40a0}


Cancels a pending H\+T\+T\+P request. 

Cancels an ongoing H\+T\+T\+P request. The callback associated with this request is not executed and the request object is freed. If the request is currently being processed, e.\+g. it is ongoing, the corresponding \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} object is going to get reset.

A request cannot be canceled if its callback has executed already. A request may be canceled reentrantly from its chunked callback.


\begin{DoxyParams}{Parameters}
{\em req} & the \hyperlink{structevhttp__request}{evhttp\+\_\+request} to cancel; req becomes invalid after this call. \\
\hline
\end{DoxyParams}


References evhttp\+\_\+request\+\_\+free().

\hypertarget{http_8h_adfd33f73c8d7af63a0da05ebb32b7e72}{\index{http.\+h@{http.\+h}!evhttp\+\_\+clear\+\_\+headers@{evhttp\+\_\+clear\+\_\+headers}}
\index{evhttp\+\_\+clear\+\_\+headers@{evhttp\+\_\+clear\+\_\+headers}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+clear\+\_\+headers}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+clear\+\_\+headers (
\begin{DoxyParamCaption}
\item[{struct evkeyvalq $\ast$}]{headers}
\end{DoxyParamCaption}
)}}\label{http_8h_adfd33f73c8d7af63a0da05ebb32b7e72}


Removes all headers from the header list. 


\begin{DoxyParams}{Parameters}
{\em headers} & the evkeyvalq object from which to remove all headers \\
\hline
\end{DoxyParams}


Referenced by evhttp\+\_\+request\+\_\+free().

\hypertarget{http_8h_af5913a2851880df25cf9ef43f7646074}{\index{http.\+h@{http.\+h}!evhttp\+\_\+connection\+\_\+base\+\_\+new@{evhttp\+\_\+connection\+\_\+base\+\_\+new}}
\index{evhttp\+\_\+connection\+\_\+base\+\_\+new@{evhttp\+\_\+connection\+\_\+base\+\_\+new}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+connection\+\_\+base\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evhttp\+\_\+connection}$\ast$ evhttp\+\_\+connection\+\_\+base\+\_\+new (
\begin{DoxyParamCaption}
\item[{struct {\bf event\+\_\+base} $\ast$}]{base, }
\item[{struct {\bf evdns\+\_\+base} $\ast$}]{dnsbase, }
\item[{const char $\ast$}]{address, }
\item[{unsigned short}]{port}
\end{DoxyParamCaption}
)}}\label{http_8h_af5913a2851880df25cf9ef43f7646074}


A connection object that can be used to for making H\+T\+T\+P requests. 

The connection object tries to resolve address and establish the connection when it is given an http request object.


\begin{DoxyParams}{Parameters}
{\em base} & the \hyperlink{structevent__base}{event\+\_\+base} to use for handling the connection \\
\hline
{\em dnsbase} & the dns\+\_\+base to use for resolving host names; if not specified host name resolution will block. \\
\hline
{\em address} & the address to which to connect \\
\hline
{\em port} & the port to connect to \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
an \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} object that can be used for making requests 
\end{DoxyReturn}


References bufferevent\+\_\+base\+\_\+set(), and evhttp\+\_\+connection\+\_\+free().



Referenced by evhttp\+\_\+connection\+\_\+new().

\hypertarget{http_8h_afa866e15c757e815a2e66cba7c8aa161}{\index{http.\+h@{http.\+h}!evhttp\+\_\+connection\+\_\+get\+\_\+peer@{evhttp\+\_\+connection\+\_\+get\+\_\+peer}}
\index{evhttp\+\_\+connection\+\_\+get\+\_\+peer@{evhttp\+\_\+connection\+\_\+get\+\_\+peer}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+connection\+\_\+get\+\_\+peer}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+connection\+\_\+get\+\_\+peer (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+connection} $\ast$}]{evcon, }
\item[{char $\ast$$\ast$}]{address, }
\item[{ev\+\_\+uint16\+\_\+t $\ast$}]{port}
\end{DoxyParamCaption}
)}}\label{http_8h_afa866e15c757e815a2e66cba7c8aa161}


Get the remote address and port associated with this connection. 

\hypertarget{http_8h_af62e12b843002e6eace204cc68da2277}{\index{http.\+h@{http.\+h}!evhttp\+\_\+connection\+\_\+set\+\_\+closecb@{evhttp\+\_\+connection\+\_\+set\+\_\+closecb}}
\index{evhttp\+\_\+connection\+\_\+set\+\_\+closecb@{evhttp\+\_\+connection\+\_\+set\+\_\+closecb}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+connection\+\_\+set\+\_\+closecb}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+connection\+\_\+set\+\_\+closecb (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+connection} $\ast$}]{evcon, }
\item[{void($\ast$)(struct {\bf evhttp\+\_\+connection} $\ast$, void $\ast$)}]{, }
\item[{void $\ast$}]{}
\end{DoxyParamCaption}
)}}\label{http_8h_af62e12b843002e6eace204cc68da2277}


Set a callback for connection close. 

\hypertarget{http_8h_a681a8e967dec9f73fb8e27f465fdae4b}{\index{http.\+h@{http.\+h}!evhttp\+\_\+decode\+\_\+uri@{evhttp\+\_\+decode\+\_\+uri}}
\index{evhttp\+\_\+decode\+\_\+uri@{evhttp\+\_\+decode\+\_\+uri}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+decode\+\_\+uri}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ evhttp\+\_\+decode\+\_\+uri (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{uri}
\end{DoxyParamCaption}
)}}\label{http_8h_a681a8e967dec9f73fb8e27f465fdae4b}


Helper function to sort of decode a U\+R\+I-\/encoded string. 

Unlike evhttp\+\_\+get\+\_\+decoded\+\_\+uri, it decodes all plus characters that appear {\itshape after} the first question mark character, but no plusses that occur before. This is not a good way to decode U\+R\+Is in whole or in part.

The returned string must be freed by the caller

\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000037}{Deprecated}]This function is deprecated; you probably want to use evhttp\+\_\+get\+\_\+decoded\+\_\+uri instead.\end{DoxyRefDesc}



\begin{DoxyParams}{Parameters}
{\em uri} & an encoded U\+R\+I \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated unencoded U\+R\+I or N\+U\+L\+L on failure 
\end{DoxyReturn}
\hypertarget{http_8h_a5404c30f3b50a664f2ec1500ebb30d86}{\index{http.\+h@{http.\+h}!evhttp\+\_\+del\+\_\+accept\+\_\+socket@{evhttp\+\_\+del\+\_\+accept\+\_\+socket}}
\index{evhttp\+\_\+del\+\_\+accept\+\_\+socket@{evhttp\+\_\+del\+\_\+accept\+\_\+socket}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+del\+\_\+accept\+\_\+socket}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+del\+\_\+accept\+\_\+socket (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{struct {\bf evhttp\+\_\+bound\+\_\+socket} $\ast$}]{bound\+\_\+socket}
\end{DoxyParamCaption}
)}}\label{http_8h_a5404c30f3b50a664f2ec1500ebb30d86}


Makes an H\+T\+T\+P server stop accepting connections on the specified socket. 

This may be useful when a socket has been sent via file descriptor passing and is no longer needed by the current process.

If you created this bound socket with evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle or evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle, this function closes the fd you provided. If you created this bound socket with evhttp\+\_\+bind\+\_\+listener, this function frees the listener you provided.

{\itshape bound\+\_\+socket} is an invalid pointer after this call returns.


\begin{DoxyParams}{Parameters}
{\em http} & a pointer to an evhttp object \\
\hline
{\em bound\+\_\+socket} & a handle returned by evhttp\+\_\+\{bind,accept\}\+\_\+socket\+\_\+with\+\_\+handle \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a7b2e494399364cfb8071e69564c33db9}{evhttp\+\_\+bind\+\_\+socket\+\_\+with\+\_\+handle()}, \hyperlink{http_8h_ae0b17d7e600e87cadda2352ea2135d8f}{evhttp\+\_\+accept\+\_\+socket\+\_\+with\+\_\+handle()} 
\end{DoxySeeAlso}
\hypertarget{http_8h_a2b6d14272efe8d5f6bb110666a2032fd}{\index{http.\+h@{http.\+h}!evhttp\+\_\+encode\+\_\+uri@{evhttp\+\_\+encode\+\_\+uri}}
\index{evhttp\+\_\+encode\+\_\+uri@{evhttp\+\_\+encode\+\_\+uri}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+encode\+\_\+uri}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ evhttp\+\_\+encode\+\_\+uri (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str}
\end{DoxyParamCaption}
)}}\label{http_8h_a2b6d14272efe8d5f6bb110666a2032fd}


Helper function to encode a string for inclusion in a U\+R\+I. 

All characters are replaced by their hex-\/escaped (\%22) equivalents, except for characters explicitly unreserved by R\+F\+C3986 -- that is, A\+S\+C\+I\+I alphanumeric characters, hyphen, dot, underscore, and tilde.

The returned string must be freed by the caller.


\begin{DoxyParams}{Parameters}
{\em str} & an unencoded string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated U\+R\+I-\/encoded string or N\+U\+L\+L on failure 
\end{DoxyReturn}


References evhttp\+\_\+uriencode().

\hypertarget{http_8h_a3a36842fd6f74977c9c0fb7aa5578832}{\index{http.\+h@{http.\+h}!evhttp\+\_\+find\+\_\+header@{evhttp\+\_\+find\+\_\+header}}
\index{evhttp\+\_\+find\+\_\+header@{evhttp\+\_\+find\+\_\+header}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+find\+\_\+header}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ evhttp\+\_\+find\+\_\+header (
\begin{DoxyParamCaption}
\item[{const struct evkeyvalq $\ast$}]{headers, }
\item[{const char $\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{http_8h_a3a36842fd6f74977c9c0fb7aa5578832}


Finds the value belonging to a header. 


\begin{DoxyParams}{Parameters}
{\em headers} & the evkeyvalq object in which to find the header \\
\hline
{\em key} & the name of the header to find \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a pointer to the value for the header or N\+U\+L\+L if the header count not be found. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a04e3f41c14b8e0e74da13a8d308b93b7}{evhttp\+\_\+add\+\_\+header()}, \hyperlink{http_8h_ab87600f14a6f8c36beedbeed8267b856}{evhttp\+\_\+remove\+\_\+header()} 
\end{DoxySeeAlso}


References evutil\+\_\+ascii\+\_\+strcasecmp().



Referenced by evhttp\+\_\+request\+\_\+get\+\_\+host(), and evhttp\+\_\+send\+\_\+reply\+\_\+start().

\hypertarget{http_8h_a849acf0f233772b486b8057fcf3aaf4a}{\index{http.\+h@{http.\+h}!evhttp\+\_\+free@{evhttp\+\_\+free}}
\index{evhttp\+\_\+free@{evhttp\+\_\+free}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+free (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http}
\end{DoxyParamCaption}
)}}\label{http_8h_a849acf0f233772b486b8057fcf3aaf4a}


Free the previously created H\+T\+T\+P server. 

Works only if no requests are currently being served.


\begin{DoxyParams}{Parameters}
{\em http} & the evhttp server object to be freed \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{http__compat_8h_aff4e96ef72ca014740878e3e5f02befc}{evhttp\+\_\+start()} 
\end{DoxySeeAlso}


References evhttp\+\_\+connection\+\_\+free().

\hypertarget{http_8h_ac9318bd77cb5f4030b434bea99b3828e}{\index{http.\+h@{http.\+h}!evhttp\+\_\+htmlescape@{evhttp\+\_\+htmlescape}}
\index{evhttp\+\_\+htmlescape@{evhttp\+\_\+htmlescape}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+htmlescape}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ evhttp\+\_\+htmlescape (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{html}
\end{DoxyParamCaption}
)}}\label{http_8h_ac9318bd77cb5f4030b434bea99b3828e}


Escape H\+T\+M\+L character entities in a string. 

Replaces $<$, $>$, ", ' and \& with $<$, $>$, ", \&\#039; and \& correspondingly.

The returned string needs to be freed by the caller.


\begin{DoxyParams}{Parameters}
{\em html} & an unescaped H\+T\+M\+L string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
an escaped H\+T\+M\+L string or N\+U\+L\+L on error 
\end{DoxyReturn}
\hypertarget{http_8h_a70af2a5e67da78782e06c640b9f85d4e}{\index{http.\+h@{http.\+h}!evhttp\+\_\+make\+\_\+request@{evhttp\+\_\+make\+\_\+request}}
\index{evhttp\+\_\+make\+\_\+request@{evhttp\+\_\+make\+\_\+request}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+make\+\_\+request}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+make\+\_\+request (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+connection} $\ast$}]{evcon, }
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req, }
\item[{enum {\bf evhttp\+\_\+cmd\+\_\+type}}]{type, }
\item[{const char $\ast$}]{uri}
\end{DoxyParamCaption}
)}}\label{http_8h_a70af2a5e67da78782e06c640b9f85d4e}


Make an H\+T\+T\+P request over the specified connection. 

The connection gets ownership of the request. On failure, the request object is no longer valid as it has been freed.


\begin{DoxyParams}{Parameters}
{\em evcon} & the \hyperlink{structevhttp__connection}{evhttp\+\_\+connection} object over which to send the request \\
\hline
{\em req} & the previously created and configured request object \\
\hline
{\em type} & the request type E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+G\+E\+T, E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+P\+O\+S\+T, etc. \\
\hline
{\em uri} & the U\+R\+I associated with the request \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_ab323fe297168f0f87af832f2bddc40a0}{evhttp\+\_\+cancel\+\_\+request()} 
\end{DoxySeeAlso}


References E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+O\+W\+N\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+O\+N, and evhttp\+\_\+request\+\_\+free().

\hypertarget{http_8h_ab8c84271a97fd85957cf72b1161b8216}{\index{http.\+h@{http.\+h}!evhttp\+\_\+new@{evhttp\+\_\+new}}
\index{evhttp\+\_\+new@{evhttp\+\_\+new}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evhttp}$\ast$ evhttp\+\_\+new (
\begin{DoxyParamCaption}
\item[{struct {\bf event\+\_\+base} $\ast$}]{base}
\end{DoxyParamCaption}
)}}\label{http_8h_ab8c84271a97fd85957cf72b1161b8216}


Create a new H\+T\+T\+P server. 


\begin{DoxyParams}{Parameters}
{\em base} & (optional) the event base to receive the H\+T\+T\+P events \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a pointer to a newly initialized evhttp server structure 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a849acf0f233772b486b8057fcf3aaf4a}{evhttp\+\_\+free()} 
\end{DoxySeeAlso}
\hypertarget{http_8h_a12d3940d23fb53c38106f8ac0d3dfff6}{\index{http.\+h@{http.\+h}!evhttp\+\_\+parse\+\_\+query@{evhttp\+\_\+parse\+\_\+query}}
\index{evhttp\+\_\+parse\+\_\+query@{evhttp\+\_\+parse\+\_\+query}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+parse\+\_\+query}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+parse\+\_\+query (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{uri, }
\item[{struct evkeyvalq $\ast$}]{headers}
\end{DoxyParamCaption}
)}}\label{http_8h_a12d3940d23fb53c38106f8ac0d3dfff6}


Helper function to parse out arguments in a query. 

Parsing a U\+R\+I like

\href{http://foo.com/?q=test&s=some+thing}{\tt http\+://foo.\+com/?q=test\&s=some+thing}

will result in two entries in the key value queue.

The first entry is\+: key=\char`\"{}q\char`\"{}, value=\char`\"{}test\char`\"{} The second entry is\+: key=\char`\"{}s\char`\"{}, value=\char`\"{}some thing\char`\"{}

\begin{DoxyRefDesc}{Deprecated}
\item[\hyperlink{deprecated__deprecated000038}{Deprecated}]This function is deprecated as of Libevent 2.\+0.\+9. Use evhttp\+\_\+uri\+\_\+parse and evhttp\+\_\+parse\+\_\+query\+\_\+str instead.\end{DoxyRefDesc}



\begin{DoxyParams}{Parameters}
{\em uri} & the request U\+R\+I \\
\hline
{\em headers} & the head of the evkeyval queue \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}
\hypertarget{http_8h_a1598fb5757f39dde6dc43dee9a2e7fca}{\index{http.\+h@{http.\+h}!evhttp\+\_\+parse\+\_\+query\+\_\+str@{evhttp\+\_\+parse\+\_\+query\+\_\+str}}
\index{evhttp\+\_\+parse\+\_\+query\+\_\+str@{evhttp\+\_\+parse\+\_\+query\+\_\+str}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+parse\+\_\+query\+\_\+str}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+parse\+\_\+query\+\_\+str (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{uri, }
\item[{struct evkeyvalq $\ast$}]{headers}
\end{DoxyParamCaption}
)}}\label{http_8h_a1598fb5757f39dde6dc43dee9a2e7fca}


Helper function to parse out arguments from the query portion of an H\+T\+T\+P U\+R\+I. 

Parsing a query string like

q=test\&s=some+thing

will result in two entries in the key value queue.

The first entry is\+: key=\char`\"{}q\char`\"{}, value=\char`\"{}test\char`\"{} The second entry is\+: key=\char`\"{}s\char`\"{}, value=\char`\"{}some thing\char`\"{}


\begin{DoxyParams}{Parameters}
{\em query\+\_\+parse} & the query portion of the U\+R\+I \\
\hline
{\em headers} & the head of the evkeyval queue \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}
\hypertarget{http_8h_ab87600f14a6f8c36beedbeed8267b856}{\index{http.\+h@{http.\+h}!evhttp\+\_\+remove\+\_\+header@{evhttp\+\_\+remove\+\_\+header}}
\index{evhttp\+\_\+remove\+\_\+header@{evhttp\+\_\+remove\+\_\+header}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+remove\+\_\+header}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+remove\+\_\+header (
\begin{DoxyParamCaption}
\item[{struct evkeyvalq $\ast$}]{headers, }
\item[{const char $\ast$}]{key}
\end{DoxyParamCaption}
)}}\label{http_8h_ab87600f14a6f8c36beedbeed8267b856}


Removes a header from a list of existing headers. 


\begin{DoxyParams}{Parameters}
{\em headers} & the evkeyvalq object from which to remove a header \\
\hline
{\em key} & the name of the header to remove \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if the header was removed, -\/1 otherwise. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a3a36842fd6f74977c9c0fb7aa5578832}{evhttp\+\_\+find\+\_\+header()}, \hyperlink{http_8h_a04e3f41c14b8e0e74da13a8d308b93b7}{evhttp\+\_\+add\+\_\+header()} 
\end{DoxySeeAlso}


References evutil\+\_\+ascii\+\_\+strcasecmp().

\hypertarget{http_8h_a88fe4c5507e88c4db284ea30a0478e5d}{\index{http.\+h@{http.\+h}!evhttp\+\_\+remove\+\_\+server\+\_\+alias@{evhttp\+\_\+remove\+\_\+server\+\_\+alias}}
\index{evhttp\+\_\+remove\+\_\+server\+\_\+alias@{evhttp\+\_\+remove\+\_\+server\+\_\+alias}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+remove\+\_\+server\+\_\+alias}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+remove\+\_\+server\+\_\+alias (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{const char $\ast$}]{alias}
\end{DoxyParamCaption}
)}}\label{http_8h_a88fe4c5507e88c4db284ea30a0478e5d}


Remove a server alias from an http object. 


\begin{DoxyParams}{Parameters}
{\em http} & the evhttp object \\
\hline
{\em alias} & the alias to remove \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a58fe001925e7f65d7678bf90b31fc2a5}{evhttp\+\_\+add\+\_\+server\+\_\+alias()} 
\end{DoxySeeAlso}


References evutil\+\_\+ascii\+\_\+strcasecmp().

\hypertarget{http_8h_ab2eb1ac82f36e7f0180b18d4553d3994}{\index{http.\+h@{http.\+h}!evhttp\+\_\+remove\+\_\+virtual\+\_\+host@{evhttp\+\_\+remove\+\_\+virtual\+\_\+host}}
\index{evhttp\+\_\+remove\+\_\+virtual\+\_\+host@{evhttp\+\_\+remove\+\_\+virtual\+\_\+host}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+remove\+\_\+virtual\+\_\+host}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+remove\+\_\+virtual\+\_\+host (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{struct {\bf evhttp} $\ast$}]{vhost}
\end{DoxyParamCaption}
)}}\label{http_8h_ab2eb1ac82f36e7f0180b18d4553d3994}


Removes a virtual host from the http server. 


\begin{DoxyParams}{Parameters}
{\em http} & the evhttp object from which to remove the virtual host \\
\hline
{\em vhost} & the virtual host to remove from the regular http server. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 on failure 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a82d8fb72c5e8c76b787987ba5de5b141}{evhttp\+\_\+add\+\_\+virtual\+\_\+host()} 
\end{DoxySeeAlso}
\hypertarget{http_8h_aad0392c873fa034be3ff09d4f8b68aba}{\index{http.\+h@{http.\+h}!evhttp\+\_\+request\+\_\+free@{evhttp\+\_\+request\+\_\+free}}
\index{evhttp\+\_\+request\+\_\+free@{evhttp\+\_\+request\+\_\+free}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+request\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+request\+\_\+free (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req}
\end{DoxyParamCaption}
)}}\label{http_8h_aad0392c873fa034be3ff09d4f8b68aba}


Frees the request object and removes associated events. 



References evbuffer\+\_\+free(), evhttp\+\_\+clear\+\_\+headers(), E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+D\+E\+F\+E\+R\+\_\+\+F\+R\+E\+E, E\+V\+H\+T\+T\+P\+\_\+\+R\+E\+Q\+\_\+\+N\+E\+E\+D\+S\+\_\+\+F\+R\+E\+E, and evhttp\+\_\+uri\+\_\+free().



Referenced by evhttp\+\_\+cancel\+\_\+request(), evhttp\+\_\+connection\+\_\+free(), evhttp\+\_\+make\+\_\+request(), evhttp\+\_\+request\+\_\+new(), and evhttp\+\_\+send\+\_\+reply\+\_\+end().

\hypertarget{http_8h_a92a534f00172fa452c45c9f3fc42d6f5}{\index{http.\+h@{http.\+h}!evhttp\+\_\+request\+\_\+get\+\_\+connection@{evhttp\+\_\+request\+\_\+get\+\_\+connection}}
\index{evhttp\+\_\+request\+\_\+get\+\_\+connection@{evhttp\+\_\+request\+\_\+get\+\_\+connection}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+request\+\_\+get\+\_\+connection}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evhttp\+\_\+connection}$\ast$ evhttp\+\_\+request\+\_\+get\+\_\+connection (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req}
\end{DoxyParamCaption}
)}}\label{http_8h_a92a534f00172fa452c45c9f3fc42d6f5}


Returns the connection object associated with the request or N\+U\+L\+L. 

The user needs to either free the request explicitly or call \hyperlink{http_8h_a77024706313626c5857089b08ec5e0ae}{evhttp\+\_\+send\+\_\+reply\+\_\+end()}. \hypertarget{http_8h_aac84865e4848b8d9089e4182e12d185e}{\index{http.\+h@{http.\+h}!evhttp\+\_\+request\+\_\+get\+\_\+host@{evhttp\+\_\+request\+\_\+get\+\_\+host}}
\index{evhttp\+\_\+request\+\_\+get\+\_\+host@{evhttp\+\_\+request\+\_\+get\+\_\+host}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+request\+\_\+get\+\_\+host}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ evhttp\+\_\+request\+\_\+get\+\_\+host (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req}
\end{DoxyParamCaption}
)}}\label{http_8h_aac84865e4848b8d9089e4182e12d185e}


Returns the host associated with the request. 

If a client sends an absolute U\+R\+I, the host part of that is preferred. Otherwise, the input headers are searched for a Host\+: header. N\+U\+L\+L is returned if no absolute U\+R\+I or Host\+: header is provided. 

References evhttp\+\_\+find\+\_\+header(), and evhttp\+\_\+uri\+\_\+get\+\_\+host().

\hypertarget{http_8h_a2f40f147e37f9a40f8ef684fb8f2d6b0}{\index{http.\+h@{http.\+h}!evhttp\+\_\+request\+\_\+new@{evhttp\+\_\+request\+\_\+new}}
\index{evhttp\+\_\+request\+\_\+new@{evhttp\+\_\+request\+\_\+new}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+request\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evhttp\+\_\+request}$\ast$ evhttp\+\_\+request\+\_\+new (
\begin{DoxyParamCaption}
\item[{void($\ast$)(struct {\bf evhttp\+\_\+request} $\ast$, void $\ast$)}]{cb, }
\item[{void $\ast$}]{arg}
\end{DoxyParamCaption}
)}}\label{http_8h_a2f40f147e37f9a40f8ef684fb8f2d6b0}


Creates a new request object that needs to be filled in with the request parameters. 

The callback is executed when the request completed or an error occurred. 

References evbuffer\+\_\+new(), and evhttp\+\_\+request\+\_\+free().

\hypertarget{http_8h_a93a13d12f579bf22af35e2f1a6d82f4c}{\index{http.\+h@{http.\+h}!evhttp\+\_\+request\+\_\+own@{evhttp\+\_\+request\+\_\+own}}
\index{evhttp\+\_\+request\+\_\+own@{evhttp\+\_\+request\+\_\+own}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+request\+\_\+own}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+request\+\_\+own (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req}
\end{DoxyParamCaption}
)}}\label{http_8h_a93a13d12f579bf22af35e2f1a6d82f4c}


Takes ownership of the request object. 

Can be used in a request callback to keep onto the request until \hyperlink{http_8h_aad0392c873fa034be3ff09d4f8b68aba}{evhttp\+\_\+request\+\_\+free()} is explicitly called by the user. 

References E\+V\+H\+T\+T\+P\+\_\+\+U\+S\+E\+R\+\_\+\+O\+W\+N\+E\+D.

\hypertarget{http_8h_a3dd375d81eac9baabc53749ed025ec12}{\index{http.\+h@{http.\+h}!evhttp\+\_\+request\+\_\+set\+\_\+chunked\+\_\+cb@{evhttp\+\_\+request\+\_\+set\+\_\+chunked\+\_\+cb}}
\index{evhttp\+\_\+request\+\_\+set\+\_\+chunked\+\_\+cb@{evhttp\+\_\+request\+\_\+set\+\_\+chunked\+\_\+cb}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+request\+\_\+set\+\_\+chunked\+\_\+cb}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+request\+\_\+set\+\_\+chunked\+\_\+cb (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{, }
\item[{void($\ast$)(struct {\bf evhttp\+\_\+request} $\ast$, void $\ast$)}]{cb}
\end{DoxyParamCaption}
)}}\label{http_8h_a3dd375d81eac9baabc53749ed025ec12}


Enable delivery of chunks to requestor. 


\begin{DoxyParams}{Parameters}
{\em cb} & will be called after every read of data with the same argument as the completion callback. Will never be called on an empty response. May drain the input buffer; it will be drained automatically on return. \\
\hline
\end{DoxyParams}
\hypertarget{http_8h_a629ef7f70ed916e162dee3bd12e397c9}{\index{http.\+h@{http.\+h}!evhttp\+\_\+send\+\_\+error@{evhttp\+\_\+send\+\_\+error}}
\index{evhttp\+\_\+send\+\_\+error@{evhttp\+\_\+send\+\_\+error}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+send\+\_\+error}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+send\+\_\+error (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req, }
\item[{int}]{error, }
\item[{const char $\ast$}]{reason}
\end{DoxyParamCaption}
)}}\label{http_8h_a629ef7f70ed916e162dee3bd12e397c9}


\hyperlink{structSend}{Send} an H\+T\+M\+L error message to the client. 


\begin{DoxyParams}{Parameters}
{\em req} & a request object \\
\hline
{\em error} & the H\+T\+T\+P error code \\
\hline
{\em reason} & a brief explanation of the error. If this is N\+U\+L\+L, we'll just use the standard meaning of the error code. \\
\hline
\end{DoxyParams}


References evbuffer\+\_\+add\+\_\+printf(), evbuffer\+\_\+free(), evbuffer\+\_\+new(), and evhttp\+\_\+connection\+\_\+free().



Referenced by evrpc\+\_\+request\+\_\+done().

\hypertarget{http_8h_a9df5ec9adc9bc664db5d6b161a293525}{\index{http.\+h@{http.\+h}!evhttp\+\_\+send\+\_\+reply@{evhttp\+\_\+send\+\_\+reply}}
\index{evhttp\+\_\+send\+\_\+reply@{evhttp\+\_\+send\+\_\+reply}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+send\+\_\+reply}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+send\+\_\+reply (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req, }
\item[{int}]{code, }
\item[{const char $\ast$}]{reason, }
\item[{struct {\bf evbuffer} $\ast$}]{databuf}
\end{DoxyParamCaption}
)}}\label{http_8h_a9df5ec9adc9bc664db5d6b161a293525}


\hyperlink{structSend}{Send} an H\+T\+M\+L reply to the client. 

The body of the reply consists of the data in databuf. After calling \hyperlink{http_8h_a9df5ec9adc9bc664db5d6b161a293525}{evhttp\+\_\+send\+\_\+reply()} databuf will be empty, but the buffer is still owned by the caller and needs to be deallocated by the caller if necessary.


\begin{DoxyParams}{Parameters}
{\em req} & a request object \\
\hline
{\em code} & the H\+T\+T\+P response code to send \\
\hline
{\em reason} & a brief message to send with the response code \\
\hline
{\em databuf} & the body of the response \\
\hline
\end{DoxyParams}
\hypertarget{http_8h_a7950f70e66678fda56fdf8288811639c}{\index{http.\+h@{http.\+h}!evhttp\+\_\+send\+\_\+reply\+\_\+chunk@{evhttp\+\_\+send\+\_\+reply\+\_\+chunk}}
\index{evhttp\+\_\+send\+\_\+reply\+\_\+chunk@{evhttp\+\_\+send\+\_\+reply\+\_\+chunk}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+send\+\_\+reply\+\_\+chunk}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+send\+\_\+reply\+\_\+chunk (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req, }
\item[{struct {\bf evbuffer} $\ast$}]{databuf}
\end{DoxyParamCaption}
)}}\label{http_8h_a7950f70e66678fda56fdf8288811639c}


\hyperlink{structSend}{Send} another data chunk as part of an ongoing chunked reply. 

The reply chunk consists of the data in databuf. After calling \hyperlink{http_8h_a7950f70e66678fda56fdf8288811639c}{evhttp\+\_\+send\+\_\+reply\+\_\+chunk()} databuf will be empty, but the buffer is still owned by the caller and needs to be deallocated by the caller if necessary.


\begin{DoxyParams}{Parameters}
{\em req} & a request object \\
\hline
{\em databuf} & the data chunk to send as part of the reply. \\
\hline
\end{DoxyParams}


References bufferevent\+\_\+get\+\_\+output(), evbuffer\+\_\+add(), evbuffer\+\_\+add\+\_\+buffer(), evbuffer\+\_\+add\+\_\+printf(), and evbuffer\+\_\+get\+\_\+length().

\hypertarget{http_8h_a77024706313626c5857089b08ec5e0ae}{\index{http.\+h@{http.\+h}!evhttp\+\_\+send\+\_\+reply\+\_\+end@{evhttp\+\_\+send\+\_\+reply\+\_\+end}}
\index{evhttp\+\_\+send\+\_\+reply\+\_\+end@{evhttp\+\_\+send\+\_\+reply\+\_\+end}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+send\+\_\+reply\+\_\+end}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+send\+\_\+reply\+\_\+end (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req}
\end{DoxyParamCaption}
)}}\label{http_8h_a77024706313626c5857089b08ec5e0ae}


Complete a chunked reply. 


\begin{DoxyParams}{Parameters}
{\em req} & a request object \\
\hline
\end{DoxyParams}


References bufferevent\+\_\+get\+\_\+output(), evbuffer\+\_\+add(), evbuffer\+\_\+get\+\_\+length(), and evhttp\+\_\+request\+\_\+free().

\hypertarget{http_8h_a69c93aab46133521997cdfb8c2e07195}{\index{http.\+h@{http.\+h}!evhttp\+\_\+send\+\_\+reply\+\_\+start@{evhttp\+\_\+send\+\_\+reply\+\_\+start}}
\index{evhttp\+\_\+send\+\_\+reply\+\_\+start@{evhttp\+\_\+send\+\_\+reply\+\_\+start}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+send\+\_\+reply\+\_\+start}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+send\+\_\+reply\+\_\+start (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+request} $\ast$}]{req, }
\item[{int}]{code, }
\item[{const char $\ast$}]{reason}
\end{DoxyParamCaption}
)}}\label{http_8h_a69c93aab46133521997cdfb8c2e07195}


Initiate a reply that uses Transfer-\/\+Encoding chunked. 

This allows the caller to stream the reply back to the client and is useful when either not all of the reply data is immediately available or when sending very large replies.

The caller needs to supply data chunks with \hyperlink{http_8h_a7950f70e66678fda56fdf8288811639c}{evhttp\+\_\+send\+\_\+reply\+\_\+chunk()} and complete the reply by calling \hyperlink{http_8h_a77024706313626c5857089b08ec5e0ae}{evhttp\+\_\+send\+\_\+reply\+\_\+end()}.


\begin{DoxyParams}{Parameters}
{\em req} & a request object \\
\hline
{\em code} & the H\+T\+T\+P response code to send \\
\hline
{\em reason} & a brief message to send with the response code \\
\hline
\end{DoxyParams}


References evhttp\+\_\+add\+\_\+header(), and evhttp\+\_\+find\+\_\+header().

\hypertarget{http_8h_ae63a0370f59570e00753f7fb512a7f59}{\index{http.\+h@{http.\+h}!evhttp\+\_\+set\+\_\+allowed\+\_\+methods@{evhttp\+\_\+set\+\_\+allowed\+\_\+methods}}
\index{evhttp\+\_\+set\+\_\+allowed\+\_\+methods@{evhttp\+\_\+set\+\_\+allowed\+\_\+methods}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+set\+\_\+allowed\+\_\+methods}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+set\+\_\+allowed\+\_\+methods (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{ev\+\_\+uint16\+\_\+t}]{methods}
\end{DoxyParamCaption}
)}}\label{http_8h_ae63a0370f59570e00753f7fb512a7f59}


Sets the what H\+T\+T\+P methods are supported in requests accepted by this server, and passed to user callbacks. 

If not supported they will generate a \char`\"{}405 Method not allowed\char`\"{} response.

By default this includes the following methods\+: G\+E\+T, P\+O\+S\+T, H\+E\+A\+D, P\+U\+T, D\+E\+L\+E\+T\+E


\begin{DoxyParams}{Parameters}
{\em http} & the http server on which to set the methods \\
\hline
{\em methods} & bit mask constructed from evhttp\+\_\+cmd\+\_\+type values \\
\hline
\end{DoxyParams}
\hypertarget{http_8h_a5b685afe43d7f4c3bfcc7dcba72d41e0}{\index{http.\+h@{http.\+h}!evhttp\+\_\+set\+\_\+cb@{evhttp\+\_\+set\+\_\+cb}}
\index{evhttp\+\_\+set\+\_\+cb@{evhttp\+\_\+set\+\_\+cb}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+set\+\_\+cb}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+set\+\_\+cb (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{const char $\ast$}]{path, }
\item[{void($\ast$)(struct {\bf evhttp\+\_\+request} $\ast$, void $\ast$)}]{cb, }
\item[{void $\ast$}]{cb\+\_\+arg}
\end{DoxyParamCaption}
)}}\label{http_8h_a5b685afe43d7f4c3bfcc7dcba72d41e0}


Set a callback for a specified U\+R\+I. 


\begin{DoxyParams}{Parameters}
{\em http} & the http sever on which to set the callback \\
\hline
{\em path} & the path for which to invoke the callback \\
\hline
{\em cb} & the callback function that gets invoked on requesting path \\
\hline
{\em cb\+\_\+arg} & an additional context argument for the callback \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, -\/1 if the callback existed already, -\/2 on failure 
\end{DoxyReturn}


Referenced by evrpc\+\_\+register\+\_\+rpc().

\hypertarget{http_8h_ad3466287c0054d32dfd538a3bdfb0374}{\index{http.\+h@{http.\+h}!evhttp\+\_\+set\+\_\+gencb@{evhttp\+\_\+set\+\_\+gencb}}
\index{evhttp\+\_\+set\+\_\+gencb@{evhttp\+\_\+set\+\_\+gencb}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+set\+\_\+gencb}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+set\+\_\+gencb (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{void($\ast$)(struct {\bf evhttp\+\_\+request} $\ast$, void $\ast$)}]{cb, }
\item[{void $\ast$}]{arg}
\end{DoxyParamCaption}
)}}\label{http_8h_ad3466287c0054d32dfd538a3bdfb0374}


Set a callback for all requests that are not caught by specific callbacks. 

Invokes the specified callback for all requests that do not match any of the previously specified request paths. This is catchall for requests not specifically configured with \hyperlink{http_8h_a5b685afe43d7f4c3bfcc7dcba72d41e0}{evhttp\+\_\+set\+\_\+cb()}.


\begin{DoxyParams}{Parameters}
{\em http} & the evhttp server object for which to set the callback \\
\hline
{\em cb} & the callback to invoke for any unmatched requests \\
\hline
{\em arg} & an context argument for the callback \\
\hline
\end{DoxyParams}
\hypertarget{http_8h_a8406065dcb34f9a058b2a7a6988ac351}{\index{http.\+h@{http.\+h}!evhttp\+\_\+set\+\_\+max\+\_\+body\+\_\+size@{evhttp\+\_\+set\+\_\+max\+\_\+body\+\_\+size}}
\index{evhttp\+\_\+set\+\_\+max\+\_\+body\+\_\+size@{evhttp\+\_\+set\+\_\+max\+\_\+body\+\_\+size}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+set\+\_\+max\+\_\+body\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+set\+\_\+max\+\_\+body\+\_\+size (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{ev\+\_\+ssize\+\_\+t}]{max\+\_\+body\+\_\+size}
\end{DoxyParamCaption}
)}}\label{http_8h_a8406065dcb34f9a058b2a7a6988ac351}


X\+X\+X Document. 

\hypertarget{http_8h_ae936aa6e7b0cb9617d0548a952db93cf}{\index{http.\+h@{http.\+h}!evhttp\+\_\+set\+\_\+max\+\_\+headers\+\_\+size@{evhttp\+\_\+set\+\_\+max\+\_\+headers\+\_\+size}}
\index{evhttp\+\_\+set\+\_\+max\+\_\+headers\+\_\+size@{evhttp\+\_\+set\+\_\+max\+\_\+headers\+\_\+size}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+set\+\_\+max\+\_\+headers\+\_\+size}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+set\+\_\+max\+\_\+headers\+\_\+size (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{ev\+\_\+ssize\+\_\+t}]{max\+\_\+headers\+\_\+size}
\end{DoxyParamCaption}
)}}\label{http_8h_ae936aa6e7b0cb9617d0548a952db93cf}


X\+X\+X Document. 

\hypertarget{http_8h_acc8bb4d9e196f957510b5db9f6a02e44}{\index{http.\+h@{http.\+h}!evhttp\+\_\+set\+\_\+timeout@{evhttp\+\_\+set\+\_\+timeout}}
\index{evhttp\+\_\+set\+\_\+timeout@{evhttp\+\_\+set\+\_\+timeout}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+set\+\_\+timeout}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+set\+\_\+timeout (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp} $\ast$}]{http, }
\item[{int}]{timeout\+\_\+in\+\_\+secs}
\end{DoxyParamCaption}
)}}\label{http_8h_acc8bb4d9e196f957510b5db9f6a02e44}


Set the timeout for an H\+T\+T\+P request. 


\begin{DoxyParams}{Parameters}
{\em http} & an evhttp object \\
\hline
{\em timeout\+\_\+in\+\_\+secs} & the timeout, in seconds \\
\hline
\end{DoxyParams}
\hypertarget{http_8h_a5ee82311278b8fda3ed93a8e358683bb}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+free@{evhttp\+\_\+uri\+\_\+free}}
\index{evhttp\+\_\+uri\+\_\+free@{evhttp\+\_\+uri\+\_\+free}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+uri\+\_\+free (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri}
\end{DoxyParamCaption}
)}}\label{http_8h_a5ee82311278b8fda3ed93a8e358683bb}


Free all memory allocated for a parsed uri. 

Only use this for U\+R\+Is generated by evhttp\+\_\+uri\+\_\+parse.


\begin{DoxyParams}{Parameters}
{\em uri} & container with parsed data \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a47bc072177c8e839083c511a618a422c}{evhttp\+\_\+uri\+\_\+parse()} 
\end{DoxySeeAlso}


Referenced by evhttp\+\_\+request\+\_\+free(), and evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags().

\hypertarget{http_8h_a2d45134ab552432fbe25eb2ff646f906}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+get\+\_\+host@{evhttp\+\_\+uri\+\_\+get\+\_\+host}}
\index{evhttp\+\_\+uri\+\_\+get\+\_\+host@{evhttp\+\_\+uri\+\_\+get\+\_\+host}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+get\+\_\+host}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ evhttp\+\_\+uri\+\_\+get\+\_\+host (
\begin{DoxyParamCaption}
\item[{const struct {\bf evhttp\+\_\+uri} $\ast$}]{uri}
\end{DoxyParamCaption}
)}}\label{http_8h_a2d45134ab552432fbe25eb2ff646f906}


Return the host part of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or N\+U\+L\+L if it has no host set. 

The host may either be a regular hostname (conforming to the R\+F\+C 3986 \char`\"{}regname\char`\"{} production), or an I\+Pv4 address, or the empty string, or a bracketed I\+Pv6 address, or a bracketed 'I\+P-\/\+Future' address.

Note that having a N\+U\+L\+L host means that the U\+R\+I has no authority section, but having an empty-\/string host means that the U\+R\+I has an authority section with no host part. For example, \char`\"{}mailto\+:user@example.\+com\char`\"{} has a host of N\+U\+L\+L, but \char`\"{}file\+:///etc/motd\char`\"{} has a host of \char`\"{}\char`\"{}. 

Referenced by evhttp\+\_\+request\+\_\+get\+\_\+host().

\hypertarget{http_8h_a60d456504f4f93f61384eb0b526f5a4c}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+get\+\_\+port@{evhttp\+\_\+uri\+\_\+get\+\_\+port}}
\index{evhttp\+\_\+uri\+\_\+get\+\_\+port@{evhttp\+\_\+uri\+\_\+get\+\_\+port}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+get\+\_\+port}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+uri\+\_\+get\+\_\+port (
\begin{DoxyParamCaption}
\item[{const struct {\bf evhttp\+\_\+uri} $\ast$}]{uri}
\end{DoxyParamCaption}
)}}\label{http_8h_a60d456504f4f93f61384eb0b526f5a4c}


Return the port part of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or -\/1 if there is no port set. 

\hypertarget{http_8h_a6f49cc20f421d2f66907c613d24ad3dc}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+get\+\_\+scheme@{evhttp\+\_\+uri\+\_\+get\+\_\+scheme}}
\index{evhttp\+\_\+uri\+\_\+get\+\_\+scheme@{evhttp\+\_\+uri\+\_\+get\+\_\+scheme}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+get\+\_\+scheme}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ evhttp\+\_\+uri\+\_\+get\+\_\+scheme (
\begin{DoxyParamCaption}
\item[{const struct {\bf evhttp\+\_\+uri} $\ast$}]{uri}
\end{DoxyParamCaption}
)}}\label{http_8h_a6f49cc20f421d2f66907c613d24ad3dc}


Return the scheme of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or N\+U\+L\+L if there is no scheme has been set and the \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} contains a Relative-\/\+Ref. 

\hypertarget{http_8h_a60f7217fccc2bdfb9cb6abeb1c4ad102}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+join@{evhttp\+\_\+uri\+\_\+join}}
\index{evhttp\+\_\+uri\+\_\+join@{evhttp\+\_\+uri\+\_\+join}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+join}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ evhttp\+\_\+uri\+\_\+join (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{char $\ast$}]{buf, }
\item[{size\+\_\+t}]{limit}
\end{DoxyParamCaption}
)}}\label{http_8h_a60f7217fccc2bdfb9cb6abeb1c4ad102}


Join together the uri parts from parsed data to form a U\+R\+I-\/\+Reference. 

Note that no escaping of reserved characters is done on the members of the \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, so the generated string might not be a valid U\+R\+I unless the members of \hyperlink{structevhttp__uri}{evhttp\+\_\+uri} are themselves valid.


\begin{DoxyParams}{Parameters}
{\em uri} & container with parsed data \\
\hline
{\em buf} & destination buffer \\
\hline
{\em limit} & destination buffer size \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
an joined uri as string or N\+U\+L\+L on error 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a47bc072177c8e839083c511a618a422c}{evhttp\+\_\+uri\+\_\+parse()} 
\end{DoxySeeAlso}


References evbuffer\+\_\+add(), evbuffer\+\_\+add\+\_\+printf(), evbuffer\+\_\+free(), evbuffer\+\_\+get\+\_\+length(), evbuffer\+\_\+new(), and evbuffer\+\_\+remove().

\hypertarget{http_8h_ad9f9447cb1c3c92e40478b98ff30db60}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags@{evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags}}
\index{evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags@{evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf evhttp\+\_\+uri}$\ast$ evhttp\+\_\+uri\+\_\+parse\+\_\+with\+\_\+flags (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{source\+\_\+uri, }
\item[{unsigned}]{flags}
\end{DoxyParamCaption}
)}}\label{http_8h_ad9f9447cb1c3c92e40478b98ff30db60}


Helper function to parse a U\+R\+I-\/\+Reference as specified by R\+F\+C3986. 

This function matches the U\+R\+I-\/\+Reference production from R\+F\+C3986, which includes both U\+R\+Is like

scheme\+://\mbox{[}\mbox{[}userinfo\mbox{]}@\mbox{]}foo.\+com\mbox{[}\+:port\mbox{]}\mbox{]}/\mbox{[}path\mbox{]}\mbox{[}?query\mbox{]}\mbox{[}\#fragment\mbox{]}

and relative-\/refs like

\mbox{[}path\mbox{]}\mbox{[}?query\mbox{]}\mbox{[}\#fragment\mbox{]}

Any optional elements portions not present in the original U\+R\+I are left set to N\+U\+L\+L in the resulting \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}. If no port is specified, the port is set to -\/1.

Note that no decoding is performed on percent-\/escaped characters in the string; if you want to parse them, use evhttp\+\_\+uridecode or evhttp\+\_\+parse\+\_\+query\+\_\+str as appropriate.

Note also that most U\+R\+I schemes will have additional constraints that this function does not know about, and cannot check. For example, mailto\+://www.example.\+com/cgi-\/bin/fortune.pl is not a reasonable mailto url, \href{http://www.example.com:99999/}{\tt http\+://www.\+example.\+com\+:99999/} is not a reasonable H\+T\+T\+P U\+R\+L, and \href{ftp:username@example.com}{\tt ftp\+:username@example.\+com} is not a reasonable F\+T\+P U\+R\+L. Nevertheless, all of these U\+R\+Ls conform to R\+F\+C3986, and this function accepts all of them as valid.


\begin{DoxyParams}{Parameters}
{\em source\+\_\+uri} & the request U\+R\+I \\
\hline
{\em flags} & Zero or more E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+$\ast$ flags to affect the behavior of the parser. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
uri container to hold parsed data, or N\+U\+L\+L if there is error 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{http_8h_a5ee82311278b8fda3ed93a8e358683bb}{evhttp\+\_\+uri\+\_\+free()} 
\end{DoxySeeAlso}


References evhttp\+\_\+uri\+\_\+free().



Referenced by evhttp\+\_\+uri\+\_\+parse().

\hypertarget{http_8h_aea0b990f1ca5ba71feffa96c8f6bd06b}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+set\+\_\+flags@{evhttp\+\_\+uri\+\_\+set\+\_\+flags}}
\index{evhttp\+\_\+uri\+\_\+set\+\_\+flags@{evhttp\+\_\+uri\+\_\+set\+\_\+flags}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+set\+\_\+flags}]{\setlength{\rightskip}{0pt plus 5cm}void evhttp\+\_\+uri\+\_\+set\+\_\+flags (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{unsigned}]{flags}
\end{DoxyParamCaption}
)}}\label{http_8h_aea0b990f1ca5ba71feffa96c8f6bd06b}


Changes the flags set on a given U\+R\+I. 

See E\+V\+H\+T\+T\+P\+\_\+\+U\+R\+I\+\_\+$\ast$ for a list of flags. \hypertarget{http_8h_a36b844028058c82b6709d1e0fe7e1cf9}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+set\+\_\+fragment@{evhttp\+\_\+uri\+\_\+set\+\_\+fragment}}
\index{evhttp\+\_\+uri\+\_\+set\+\_\+fragment@{evhttp\+\_\+uri\+\_\+set\+\_\+fragment}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+set\+\_\+fragment}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+uri\+\_\+set\+\_\+fragment (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{const char $\ast$}]{fragment}
\end{DoxyParamCaption}
)}}\label{http_8h_a36b844028058c82b6709d1e0fe7e1cf9}


Set the fragment of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the fragment if fragment==N\+U\+L\+L. 

The fragment should not include a leading \char`\"{}\#\char`\"{}. Returns 0 on success, -\/1 if fragment is not well-\/formed. \hypertarget{http_8h_a103c447efb9f41a5897b3aa130424734}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+set\+\_\+host@{evhttp\+\_\+uri\+\_\+set\+\_\+host}}
\index{evhttp\+\_\+uri\+\_\+set\+\_\+host@{evhttp\+\_\+uri\+\_\+set\+\_\+host}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+set\+\_\+host}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+uri\+\_\+set\+\_\+host (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{const char $\ast$}]{host}
\end{DoxyParamCaption}
)}}\label{http_8h_a103c447efb9f41a5897b3aa130424734}


Set the host of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the host if host==N\+U\+L\+L. 

Returns 0 on success, -\/1 if host is not well-\/formed. \hypertarget{http_8h_ae6bbfc5cf62df674ba72800ea46c5828}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+set\+\_\+path@{evhttp\+\_\+uri\+\_\+set\+\_\+path}}
\index{evhttp\+\_\+uri\+\_\+set\+\_\+path@{evhttp\+\_\+uri\+\_\+set\+\_\+path}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+set\+\_\+path}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+uri\+\_\+set\+\_\+path (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{const char $\ast$}]{path}
\end{DoxyParamCaption}
)}}\label{http_8h_ae6bbfc5cf62df674ba72800ea46c5828}


Set the path of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the path if path==N\+U\+L\+L. 

Returns 0 on success, -\/1 if path is not well-\/formed. \hypertarget{http_8h_a8cc430f9b8fb4c6aa11692d5ef0b383c}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+set\+\_\+port@{evhttp\+\_\+uri\+\_\+set\+\_\+port}}
\index{evhttp\+\_\+uri\+\_\+set\+\_\+port@{evhttp\+\_\+uri\+\_\+set\+\_\+port}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+set\+\_\+port}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+uri\+\_\+set\+\_\+port (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{int}]{port}
\end{DoxyParamCaption}
)}}\label{http_8h_a8cc430f9b8fb4c6aa11692d5ef0b383c}


Set the port of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the port if port==-\/1. 

Returns 0 on success, -\/1 if port is not well-\/formed. \hypertarget{http_8h_aaf999637136bc1785e5d75c191c671ba}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+set\+\_\+query@{evhttp\+\_\+uri\+\_\+set\+\_\+query}}
\index{evhttp\+\_\+uri\+\_\+set\+\_\+query@{evhttp\+\_\+uri\+\_\+set\+\_\+query}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+set\+\_\+query}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+uri\+\_\+set\+\_\+query (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{const char $\ast$}]{query}
\end{DoxyParamCaption}
)}}\label{http_8h_aaf999637136bc1785e5d75c191c671ba}


Set the query of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the query if query==N\+U\+L\+L. 

The query should not include a leading \char`\"{}?\char`\"{}. Returns 0 on success, -\/1 if query is not well-\/formed. \hypertarget{http_8h_abf5f82fb9c8f8df0b1b4c73691791dd5}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+set\+\_\+scheme@{evhttp\+\_\+uri\+\_\+set\+\_\+scheme}}
\index{evhttp\+\_\+uri\+\_\+set\+\_\+scheme@{evhttp\+\_\+uri\+\_\+set\+\_\+scheme}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+set\+\_\+scheme}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+uri\+\_\+set\+\_\+scheme (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{const char $\ast$}]{scheme}
\end{DoxyParamCaption}
)}}\label{http_8h_abf5f82fb9c8f8df0b1b4c73691791dd5}


Set the scheme of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the scheme if scheme==N\+U\+L\+L. 

Returns 0 on success, -\/1 if scheme is not well-\/formed. \hypertarget{http_8h_ac7b10b8ef8ee94d14674f9329486d355}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uri\+\_\+set\+\_\+userinfo@{evhttp\+\_\+uri\+\_\+set\+\_\+userinfo}}
\index{evhttp\+\_\+uri\+\_\+set\+\_\+userinfo@{evhttp\+\_\+uri\+\_\+set\+\_\+userinfo}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uri\+\_\+set\+\_\+userinfo}]{\setlength{\rightskip}{0pt plus 5cm}int evhttp\+\_\+uri\+\_\+set\+\_\+userinfo (
\begin{DoxyParamCaption}
\item[{struct {\bf evhttp\+\_\+uri} $\ast$}]{uri, }
\item[{const char $\ast$}]{userinfo}
\end{DoxyParamCaption}
)}}\label{http_8h_ac7b10b8ef8ee94d14674f9329486d355}


Set the userinfo of an \hyperlink{structevhttp__uri}{evhttp\+\_\+uri}, or clear the userinfo if userinfo==N\+U\+L\+L. 

Returns 0 on success, -\/1 if userinfo is not well-\/formed. \hypertarget{http_8h_ac2914389616f04199aded10444fd8e42}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uridecode@{evhttp\+\_\+uridecode}}
\index{evhttp\+\_\+uridecode@{evhttp\+\_\+uridecode}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uridecode}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ evhttp\+\_\+uridecode (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{uri, }
\item[{int}]{decode\+\_\+plus, }
\item[{size\+\_\+t $\ast$}]{size\+\_\+out}
\end{DoxyParamCaption}
)}}\label{http_8h_ac2914389616f04199aded10444fd8e42}


Helper function to decode a U\+R\+I-\/escaped string or H\+T\+T\+P parameter. 

If 'decode\+\_\+plus' is 1, then we decode the string as an H\+T\+T\+P parameter value, and convert all plus ('+') characters to spaces. If 'decode\+\_\+plus' is 0, we leave all plus characters unchanged.

The returned string must be freed by the caller.


\begin{DoxyParams}{Parameters}
{\em uri} & a U\+R\+I-\/encode encoded U\+R\+I \\
\hline
{\em decode\+\_\+plus} & determines whether we convert '+' to sapce. \\
\hline
{\em size\+\_\+out} & if size\+\_\+out is not N\+U\+L\+L, $\ast$size\+\_\+out is set to the size of the returned string \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocated unencoded U\+R\+I or N\+U\+L\+L on failure 
\end{DoxyReturn}
\hypertarget{http_8h_ab64229249a981ccfea09161a199972da}{\index{http.\+h@{http.\+h}!evhttp\+\_\+uriencode@{evhttp\+\_\+uriencode}}
\index{evhttp\+\_\+uriencode@{evhttp\+\_\+uriencode}!http.\+h@{http.\+h}}
\subsubsection[{evhttp\+\_\+uriencode}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ evhttp\+\_\+uriencode (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{str, }
\item[{ev\+\_\+ssize\+\_\+t}]{size, }
\item[{int}]{space\+\_\+to\+\_\+plus}
\end{DoxyParamCaption}
)}}\label{http_8h_ab64229249a981ccfea09161a199972da}


As evhttp\+\_\+encode\+\_\+uri, but if 'size' is nonnegative, treat the string as being 'size' bytes long. 

This allows you to encode strings that may contain 0-\/valued bytes.

The returned string must be freed by the caller.


\begin{DoxyParams}{Parameters}
{\em str} & an unencoded string \\
\hline
{\em size} & the length of the string to encode, or -\/1 if the string is N\+U\+L-\/terminated \\
\hline
{\em space\+\_\+to\+\_\+plus} & if true, space characters in 'str' are encoded as +, not \%20. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a newly allocate U\+R\+I-\/encoded string, or N\+U\+L\+L on failure. 
\end{DoxyReturn}


References evbuffer\+\_\+add(), evbuffer\+\_\+add\+\_\+printf(), evbuffer\+\_\+free(), evbuffer\+\_\+get\+\_\+length(), evbuffer\+\_\+new(), and evbuffer\+\_\+remove().



Referenced by evhttp\+\_\+encode\+\_\+uri().

