Lines Matching +full:send +full:- +full:not +full:- +full:empty

2  * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
3 * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
13 * 3. The name of the author may not be used to endorse or promote products
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
57 #define HTTP_NOCONTENT 204 /**< request does not have content */
60 #define HTTP_NOTMODIFIED 304 /**< page was not modified from last */
62 #define HTTP_NOTFOUND 404 /**< could not find content for uri */
63 #define HTTP_BADMETHOD 405 /**< method not allowed for this uri */
67 #define HTTP_NOTIMPLEMENTED 501 /**< not implemented */
68 #define HTTP_SERVUNAVAIL 503 /**< the server is not available */
97 * @return 0 on success, -1 on failure.
106 * The returned pointer is not valid after \a http is freed.
122 * descriptor passing in situations where an http servers does not have
123 * permissions to bind to a low-numbered port.
130 * @return 0 on success, -1 on failure.
139 * The returned pointer is not valid after \a http is freed.
150 * The most low-level evhttp_bind/accept method: takes an evconnlistener, and
166 * evhttp_bound_sockets associated with "http". The user must not
226 Set the value to use for the Content-Type header when none was provided. If
227 the content type string is NULL, the Content-Type header will not be
231 @param content_type the value for the Content-Type header
241 If not supported they will generate a "405 Method not allowed" response.
258 @return 0 on success, -1 if the callback existed already, -2 on failure
269 Set a callback for all requests that are not caught by specific callbacks
271 Invokes the specified callback for all requests that do not match any of
272 the previously specified request paths. This is catchall for requests not
287 You can use this to override the default bufferevent type -- for example,
306 most not have any listing sockets associated with it.
308 If the virtual host has not been removed by the time that evhttp_free()
320 @return 0 on success, -1 on failure
332 @return 0 on success, -1 on failure
393 * Send an HTML error message to the client.
405 * Send an HTML reply to the client.
408 * evhttp_send_reply() databuf will be empty, but the buffer is still
413 * @param code the HTTP response code to send
414 * @param reason a brief message to send with the response code
421 /* Low-level response interface, for streaming/chunked replies */
424 Initiate a reply that uses Transfer-Encoding chunked.
427 useful when either not all of the reply data is immediately available
434 @param code the HTTP response code to send
435 @param reason a brief message to send with the response code
442 Send another data chunk as part of an ongoing chunked reply.
445 evhttp_send_reply_chunk() databuf will be empty, but the buffer is
450 @param databuf the data chunk to send as part of the reply.
457 Send another data chunk as part of an ongoing chunked reply.
460 evhttp_send_reply_chunk() databuf will be empty, but the buffer is
465 @param databuf the data chunk to send as part of the reply.
513 * @param dnsbase the dns_base to use for resolving host names; if not
516 * socket-based bufferevent will be created. This buffrevent will be freed
551 * as the completion callback. Will never be called on an empty
637 * @param dnsbase the dns_base to use for resolving host names; if not
658 /* Try to read error, since server may already send and close
659 * connection, but if at that time we have some data to send then we
660 * can send get EPIPE and fail, while we can read that HTTP error. */
664 /* Padding for public flags, @see EVHTTP_CON_* in http-internal.h */
753 /** Sets the retry limit for this connection - -1 repeats indefinitely */
772 * or connection is not connected,
784 @param evcon the evhttp_connection object over which to send the request
788 @return 0 on success, -1 on failure
800 is not executed and the request object is freed. If the request is
813 * A structure to hold a parsed URI or Relative-Ref conforming to RFC3986.
859 could not be found.
871 @returns 0 if the header was removed, -1 otherwise.
883 @returns 0 on success, -1 otherwise.
902 characters are replaced by their hex-escaped (%22) equivalents,
903 except for characters explicitly unreserved by RFC3986 -- that is,
909 @return a newly allocated URI-encoded string or NULL on failure
917 may contain 0-valued bytes.
922 @param size the length of the string to encode, or -1 if the string
923 is NUL-terminated
925 as +, not %20.
926 @return a newly allocate URI-encoded string, or NULL on failure.
932 Helper function to sort of decode a URI-encoded string. Unlike
935 before. This is not a good way to decode URIs in whole or in part.
949 Helper function to decode a URI-escaped string or HTTP parameter.
957 @param uri a URI-encode encoded URI
959 @param size_out if size_out is not NULL, *size_out is set to the size of the
984 @return 0 on success, -1 on failure
1004 @return 0 on success, -1 on failure
1024 * Return a new empty evhttp_uri with no fields set.
1037 * been set and the evhttp_uri contains a Relative-Ref. */
1049 * "regname" production), or an IPv4 address, or the empty string, or a
1050 * bracketed IPv6 address, or a bracketed 'IP-Future' address.
1053 * section, but having an empty-string host means that the URI has an
1060 /** Return the port part of an evhttp_uri, or -1 if there is no port set. */
1076 * Returns 0 on success, -1 if scheme is not well-formed. */
1080 * Returns 0 on success, -1 if userinfo is not well-formed. */
1084 * Returns 0 on success, -1 if host is not well-formed. */
1087 /** Set the port of an evhttp_uri, or clear the port if port==-1.
1088 * Returns 0 on success, -1 if port is not well-formed. */
1092 * Returns 0 on success, -1 if path is not well-formed. */
1096 * The query should not include a leading "?".
1097 * Returns 0 on success, -1 if query is not well-formed. */
1101 * The fragment should not include a leading "#".
1102 * Returns 0 on success, -1 if fragment is not well-formed. */
1107 * Helper function to parse a URI-Reference as specified by RFC3986.
1109 * This function matches the URI-Reference production from RFC3986,
1114 * and relative-refs like
1118 * Any optional elements portions not present in the original URI are
1120 * specified, the port is set to -1.
1122 * Note that no decoding is performed on percent-escaped characters in
1127 * this function does not know about, and cannot check. For example,
1128 * mailto://www.example.com/cgi-bin/fortune.pl is not a reasonable
1129 * mailto url, http://www.example.com:99999/ is not a reasonable HTTP
1130 * URL, and ftp:username@example.com is not a reasonable FTP URL.
1144 /** Tolerate URIs that do not conform to RFC3986.
1147 * are not conformant URIs. If you need to support these URIs, you can
1173 * Join together the uri parts from parsed data to form a URI-Reference.
1176 * of the evhttp_uri, so the generated string might not be a valid URI