serf.h   serf.h 
skipping to change at line 84 skipping to change at line 84
*/ */
#define SERF_ERROR_WAIT_CONN (APR_OS_START_USERERR + SERF_ERROR_RANGE + 3) #define SERF_ERROR_WAIT_CONN (APR_OS_START_USERERR + SERF_ERROR_RANGE + 3)
/* This code is for when something went wrong during deflating compressed /* This code is for when something went wrong during deflating compressed
* data e.g. a CRC error. */ * data e.g. a CRC error. */
#define SERF_ERROR_DECOMPRESSION_FAILED (APR_OS_START_USERERR + \ #define SERF_ERROR_DECOMPRESSION_FAILED (APR_OS_START_USERERR + \
SERF_ERROR_RANGE + 4) SERF_ERROR_RANGE + 4)
/* This code is for when a response received from a http server is not in /* This code is for when a response received from a http server is not in
* http-compliant syntax. */ * http-compliant syntax. */
#define SERF_ERROR_BAD_HTTP_RESPONSE (APR_OS_START_USERERR + \ #define SERF_ERROR_BAD_HTTP_RESPONSE (APR_OS_START_USERERR + \
SERF_ERROR_RANGE + 5) SERF_ERROR_RANGE + 5)
/* The server sent less data than what was announced. */
#define SERF_ERROR_TRUNCATED_HTTP_RESPONSE (APR_OS_START_USERERR + \
SERF_ERROR_RANGE + 6)
/* The proxy server returned an error while setting up the SSL tunnel. */
#define SERF_ERROR_SSLTUNNEL_SETUP_FAILED (APR_OS_START_USERERR + \
SERF_ERROR_RANGE + 7)
/* The server unexpectedly closed the connection prematurely. */
#define SERF_ERROR_ABORTED_CONNECTION (APR_OS_START_USERERR + \
SERF_ERROR_RANGE + 8)
/* SSL certificates related errors */ /* SSL certificates related errors */
#define SERF_ERROR_SSL_CERT_FAILED (APR_OS_START_USERERR + SERF_ERROR_RANGE + 70) #define SERF_ERROR_SSL_CERT_FAILED (APR_OS_START_USERERR + SERF_ERROR_RANGE + 70)
/* SSL communications related errors */ /* SSL communications related errors */
#define SERF_ERROR_SSL_COMM_FAILED (APR_OS_START_USERERR + SERF_ERROR_RANGE + 71) #define SERF_ERROR_SSL_COMM_FAILED (APR_OS_START_USERERR + SERF_ERROR_RANGE + 71)
/* General authentication related errors */ /* General authentication related errors */
#define SERF_ERROR_AUTHN_FAILED (APR_OS_START_USERERR + SERF_ERROR_RANGE + 90) #define SERF_ERROR_AUTHN_FAILED (APR_OS_START_USERERR + SERF_ERROR_RANGE + 90)
skipping to change at line 107 skipping to change at line 116
/* Authn was requested by the server but the header lacked some attribute */ /* Authn was requested by the server but the header lacked some attribute */
#define SERF_ERROR_AUTHN_MISSING_ATTRIBUTE (APR_OS_START_USERERR + SERF_ERR OR_RANGE + 92) #define SERF_ERROR_AUTHN_MISSING_ATTRIBUTE (APR_OS_START_USERERR + SERF_ERR OR_RANGE + 92)
/* Authentication handler initialization related errors */ /* Authentication handler initialization related errors */
#define SERF_ERROR_AUTHN_INITALIZATION_FAILED (APR_OS_START_USERERR +\ #define SERF_ERROR_AUTHN_INITALIZATION_FAILED (APR_OS_START_USERERR +\
SERF_ERROR_RANGE + 93) SERF_ERROR_RANGE + 93)
/* This macro groups errors potentially raised when reading a http response . */ /* This macro groups errors potentially raised when reading a http response . */
#define SERF_BAD_RESPONSE_ERROR(status) ((status) \ #define SERF_BAD_RESPONSE_ERROR(status) ((status) \
&& ((SERF_ERROR_DECOMPRESSION_FAILED == (status)) \ && ((SERF_ERROR_DECOMPRESSION_FAILED == (status)) \
||(SERF_ERROR_BAD_HTTP_RESPONSE == (status)))) ||(SERF_ERROR_BAD_HTTP_RESPONSE == (status)) \
||(SERF_ERROR_TRUNCATED_HTTP_RESPONSE == (status))))
/** /**
* Return a string that describes the specified error code. * Return a string that describes the specified error code.
* *
* If the error code is not one of the above Serf error codes, then * If the error code is not one of the above Serf error codes, then
* NULL will be returned. * NULL will be returned.
* *
* Note regarding lifetime: the string is a statically-allocated constant * Note regarding lifetime: the string is a statically-allocated constant
*/ */
const char *serf_error_string(apr_status_t errcode); const char *serf_error_string(apr_status_t errcode);
skipping to change at line 372 skipping to change at line 382
char **username, char **username,
char **password, char **password,
serf_request_t *request, void *baton, serf_request_t *request, void *baton,
int code, const char *authn_type, int code, const char *authn_type,
const char *realm, const char *realm,
apr_pool_t *pool); apr_pool_t *pool);
/** /**
* Create a new connection associated with the @a ctx serf context. * Create a new connection associated with the @a ctx serf context.
* *
* A connection will be created to (eventually) connect to the address * If no proxy server is configured, a connection will be created to
* specified by @a address. The address must live at least as long as * (eventually) connect to the address specified by @a address. The address
* @a pool (thus, as long as the connection object). must
* live at least as long as @a pool (thus, as long as the connection object
).
* If a proxy server is configured, @address will be ignored.
* *
* The connection object will be allocated within @a pool. Clearing or * The connection object will be allocated within @a pool. Clearing or
* destroying this pool will close the connection, and terminate any * destroying this pool will close the connection, and terminate any
* outstanding requests or responses. * outstanding requests or responses.
* *
* When the connection is closed (upon request or because of an error), * When the connection is closed (upon request or because of an error),
* then the @a closed callback is invoked, and @a closed_baton is passed. * then the @a closed callback is invoked, and @a closed_baton is passed.
* *
* ### doc on setup(_baton). tweak below comment re: acceptor. * ### doc on setup(_baton). tweak below comment re: acceptor.
* NULL may be passed for @a acceptor and @a closed; default implementation s * NULL may be passed for @a acceptor and @a closed; default implementation s
skipping to change at line 558 skipping to change at line 569
* with @see serf_request_cancel. * with @see serf_request_cancel.
* *
* Invoking any calls other than @see serf_request_cancel before the setup * Invoking any calls other than @see serf_request_cancel before the setup
* callback executes is not supported. * callback executes is not supported.
*/ */
serf_request_t *serf_connection_priority_request_create( serf_request_t *serf_connection_priority_request_create(
serf_connection_t *conn, serf_connection_t *conn,
serf_request_setup_t setup, serf_request_setup_t setup,
void *setup_baton); void *setup_baton);
/** Returns detected network latency for the @a conn connection. Negative
* value means that latency is unknwon.
*/
apr_interval_time_t serf_connection_get_latency(serf_connection_t *conn);
/** Check if a @a request has been completely written.
*
* Returns APR_SUCCESS if the request was written completely on the connect
ion.
* Returns APR_EBUSY if the request is not yet or partially written.
*/
apr_status_t serf_request_is_written(
serf_request_t *request);
/** /**
* Cancel the request specified by the @a request object. * Cancel the request specified by the @a request object.
* *
* If the request has been scheduled for delivery, then its response * If the request has been scheduled for delivery, then its response
* handler will be run, passing NULL for the response bucket. * handler will be run, passing NULL for the response bucket.
* *
* If the request has already been (partially or fully) delivered, then * If the request has already been (partially or fully) delivered, then
* APR_EBUSY is returned and the request is *NOT* canceled. To properly * APR_EBUSY is returned and the request is *NOT* canceled. To properly
* cancel the request, the connection must be closed (by clearing or * cancel the request, the connection must be closed (by clearing or
* destroying its associated pool). * destroying its associated pool).
skipping to change at line 1024 skipping to change at line 1048
serf_bucket_alloc_t *allocator); serf_bucket_alloc_t *allocator);
void serf_debug__closed_conn( void serf_debug__closed_conn(
serf_bucket_alloc_t *allocator); serf_bucket_alloc_t *allocator);
void serf_debug__bucket_destroy( void serf_debug__bucket_destroy(
const serf_bucket_t *bucket); const serf_bucket_t *bucket);
void serf_debug__bucket_alloc_check( void serf_debug__bucket_alloc_check(
serf_bucket_alloc_t *allocator); serf_bucket_alloc_t *allocator);
/* Version info */ /* Version info */
#define SERF_MAJOR_VERSION 1 #define SERF_MAJOR_VERSION 1
#define SERF_MINOR_VERSION 1 #define SERF_MINOR_VERSION 2
#define SERF_PATCH_VERSION 1 #define SERF_PATCH_VERSION 0
/* Version number string */ /* Version number string */
#define SERF_VERSION_STRING APR_STRINGIFY(SERF_MAJOR_VERSION) "." \ #define SERF_VERSION_STRING APR_STRINGIFY(SERF_MAJOR_VERSION) "." \
APR_STRINGIFY(SERF_MINOR_VERSION) "." \ APR_STRINGIFY(SERF_MINOR_VERSION) "." \
APR_STRINGIFY(SERF_PATCH_VERSION) APR_STRINGIFY(SERF_PATCH_VERSION)
/** /**
* Check at compile time if the Serf version is at least a certain * Check at compile time if the Serf version is at least a certain
* level. * level.
* @param major The major version component of the version checked * @param major The major version component of the version checked
 End of changes. 5 change blocks. 
6 lines changed or deleted 33 lines changed or added


 serf_bucket_types.h   serf_bucket_types.h 
skipping to change at line 85 skipping to change at line 85
extern const serf_bucket_type_t serf_bucket_type_response; extern const serf_bucket_type_t serf_bucket_type_response;
#define SERF_BUCKET_IS_RESPONSE(b) SERF_BUCKET_CHECK((b), response) #define SERF_BUCKET_IS_RESPONSE(b) SERF_BUCKET_CHECK((b), response)
serf_bucket_t *serf_bucket_response_create( serf_bucket_t *serf_bucket_response_create(
serf_bucket_t *stream, serf_bucket_t *stream,
serf_bucket_alloc_t *allocator); serf_bucket_alloc_t *allocator);
#define SERF_HTTP_VERSION(major, minor) ((major) * 1000 + (minor)) #define SERF_HTTP_VERSION(major, minor) ((major) * 1000 + (minor))
#define SERF_HTTP_11 SERF_HTTP_VERSION(1, 1) #define SERF_HTTP_11 SERF_HTTP_VERSION(1, 1)
#define SERF_HTTP_10 SERF_HTTP_VERSION(1, 0) #define SERF_HTTP_10 SERF_HTTP_VERSION(1, 0)
#define SERF_HTTP_VERSION_MAJOR(shv) ((int)shv / 1000)
#define SERF_HTTP_VERSION_MINOR(shv) ((int)shv % 1000)
typedef struct { typedef struct {
int version; int version;
int code; int code;
const char *reason; const char *reason;
} serf_status_line; } serf_status_line;
/** /**
* Return the Status-Line information, if available. This function * Return the Status-Line information, if available. This function
* works like other bucket read functions: it may return APR_EAGAIN or * works like other bucket read functions: it may return APR_EAGAIN or
skipping to change at line 129 skipping to change at line 131
/** /**
* Advise the response @a bucket that this was from a HEAD request and * Advise the response @a bucket that this was from a HEAD request and
* that it should not expect to see a response body. * that it should not expect to see a response body.
*/ */
void serf_bucket_response_set_head( void serf_bucket_response_set_head(
serf_bucket_t *bucket); serf_bucket_t *bucket);
/* ==================================================================== */ /* ==================================================================== */
extern const serf_bucket_type_t serf_bucket_type_response_body;
#define SERF_BUCKET_IS_RESPONSE_BODY(b) SERF_BUCKET_CHECK((b), response_bod
y)
serf_bucket_t *serf_bucket_response_body_create(
serf_bucket_t *stream,
apr_uint64_t limit,
serf_bucket_alloc_t *allocator);
/* ==================================================================== */
extern const serf_bucket_type_t serf_bucket_type_bwtp_frame; extern const serf_bucket_type_t serf_bucket_type_bwtp_frame;
#define SERF_BUCKET_IS_BWTP_FRAME(b) SERF_BUCKET_CHECK((b), bwtp_frame) #define SERF_BUCKET_IS_BWTP_FRAME(b) SERF_BUCKET_CHECK((b), bwtp_frame)
extern const serf_bucket_type_t serf_bucket_type_bwtp_incoming_frame; extern const serf_bucket_type_t serf_bucket_type_bwtp_incoming_frame;
#define SERF_BUCKET_IS_BWTP_INCOMING_FRAME(b) SERF_BUCKET_CHECK((b), bwtp_i ncoming_frame) #define SERF_BUCKET_IS_BWTP_INCOMING_FRAME(b) SERF_BUCKET_CHECK((b), bwtp_i ncoming_frame)
int serf_bucket_bwtp_frame_get_channel( int serf_bucket_bwtp_frame_get_channel(
serf_bucket_t *hdr); serf_bucket_t *hdr);
int serf_bucket_bwtp_frame_get_type( int serf_bucket_bwtp_frame_get_type(
skipping to change at line 454 skipping to change at line 466
serf_bucket_t *stream, serf_bucket_t *stream,
apr_uint64_t limit, apr_uint64_t limit,
serf_bucket_alloc_t *allocator); serf_bucket_alloc_t *allocator);
/* ==================================================================== */ /* ==================================================================== */
#define SERF_SSL_CERT_NOTYETVALID 1 #define SERF_SSL_CERT_NOTYETVALID 1
#define SERF_SSL_CERT_EXPIRED 2 #define SERF_SSL_CERT_EXPIRED 2
#define SERF_SSL_CERT_UNKNOWNCA 4 #define SERF_SSL_CERT_UNKNOWNCA 4
#define SERF_SSL_CERT_SELF_SIGNED 8 #define SERF_SSL_CERT_SELF_SIGNED 8
#define SERF_SSL_CERT_UNKNOWN_FAILURE 16 #define SERF_SSL_CERT_UNKNOWN_FAILURE 16
#define SERF_SSL_CERT_REVOKED 32
extern const serf_bucket_type_t serf_bucket_type_ssl_encrypt; extern const serf_bucket_type_t serf_bucket_type_ssl_encrypt;
#define SERF_BUCKET_IS_SSL_ENCRYPT(b) SERF_BUCKET_CHECK((b), ssl_encrypt) #define SERF_BUCKET_IS_SSL_ENCRYPT(b) SERF_BUCKET_CHECK((b), ssl_encrypt)
typedef struct serf_ssl_context_t serf_ssl_context_t; typedef struct serf_ssl_context_t serf_ssl_context_t;
typedef struct serf_ssl_certificate_t serf_ssl_certificate_t; typedef struct serf_ssl_certificate_t serf_ssl_certificate_t;
typedef apr_status_t (*serf_ssl_need_client_cert_t)( typedef apr_status_t (*serf_ssl_need_client_cert_t)(
void *data, void *data,
const char **cert_path); const char **cert_path);
skipping to change at line 582 skipping to change at line 595
/** /**
* Adds the certificate @a cert to the list of trusted certificates in * Adds the certificate @a cert to the list of trusted certificates in
* @a ssl_ctx that will be used for verification. * @a ssl_ctx that will be used for verification.
* See also @a serf_ssl_load_cert_file. * See also @a serf_ssl_load_cert_file.
*/ */
apr_status_t serf_ssl_trust_cert( apr_status_t serf_ssl_trust_cert(
serf_ssl_context_t *ssl_ctx, serf_ssl_context_t *ssl_ctx,
serf_ssl_certificate_t *cert); serf_ssl_certificate_t *cert);
/**
* Enable or disable SSL compression on a SSL session.
* @a enabled = 1 to enable compression, 0 to disable compression.
* Default = disabled.
*/
apr_status_t serf_ssl_use_compression(
serf_ssl_context_t *ssl_ctx,
int enabled);
serf_bucket_t *serf_bucket_ssl_encrypt_create( serf_bucket_t *serf_bucket_ssl_encrypt_create(
serf_bucket_t *stream, serf_bucket_t *stream,
serf_ssl_context_t *ssl_context, serf_ssl_context_t *ssl_context,
serf_bucket_alloc_t *allocator); serf_bucket_alloc_t *allocator);
serf_ssl_context_t *serf_bucket_ssl_encrypt_context_get( serf_ssl_context_t *serf_bucket_ssl_encrypt_context_get(
serf_bucket_t *bucket); serf_bucket_t *bucket);
/* ==================================================================== */ /* ==================================================================== */
 End of changes. 4 change blocks. 
0 lines changed or deleted 23 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/