serf.h   serf.h 
skipping to change at line 61 skipping to change at line 61
/** /**
* @defgroup serf high-level constructs * @defgroup serf high-level constructs
* @ingroup serf * @ingroup serf
* @{ * @{
*/ */
/** /**
* Serf-specific error codes * Serf-specific error codes
*/ */
#define SERF_ERROR_RANGE 100 #define SERF_ERROR_RANGE 100
#define SERF_ERROR_START (APR_OS_START_USERERR + SERF_ERROR_RANGE)
/* This code is for when this is the last response on this connection: /* This code is for when this is the last response on this connection:
* i.e. do not send any more requests on this connection or expect * i.e. do not send any more requests on this connection or expect
* any more responses. * any more responses.
*/ */
#define SERF_ERROR_CLOSING (APR_OS_START_USERERR + SERF_ERROR_RANGE + 1) #define SERF_ERROR_CLOSING (SERF_ERROR_START + 1)
/* This code is for when the connection terminated before the request /* This code is for when the connection terminated before the request
* could be processed on the other side. * could be processed on the other side.
*/ */
#define SERF_ERROR_REQUEST_LOST (APR_OS_START_USERERR + SERF_ERROR_RANGE + 2) #define SERF_ERROR_REQUEST_LOST (SERF_ERROR_START + 2)
/* This code is for when the connection is blocked - we can not proceed /* This code is for when the connection is blocked - we can not proceed
* until something happens - generally due to SSL negotiation-like behavior * until something happens - generally due to SSL negotiation-like behavior
* where a write() is blocked until a read() is processed. * where a write() is blocked until a read() is processed.
*/ */
#define SERF_ERROR_WAIT_CONN (APR_OS_START_USERERR + SERF_ERROR_RANGE + 3) #define SERF_ERROR_WAIT_CONN (SERF_ERROR_START + 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 (SERF_ERROR_START + 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 (SERF_ERROR_START + 5)
SERF_ERROR_RANGE + 5)
/* The server sent less data than what was announced. */ /* The server sent less data than what was announced. */
#define SERF_ERROR_TRUNCATED_HTTP_RESPONSE (APR_OS_START_USERERR + \ #define SERF_ERROR_TRUNCATED_HTTP_RESPONSE (SERF_ERROR_START + 6)
SERF_ERROR_RANGE + 6)
/* The proxy server returned an error while setting up the SSL tunnel. */ /* The proxy server returned an error while setting up the SSL tunnel. */
#define SERF_ERROR_SSLTUNNEL_SETUP_FAILED (APR_OS_START_USERERR + \ #define SERF_ERROR_SSLTUNNEL_SETUP_FAILED (SERF_ERROR_START + 7)
SERF_ERROR_RANGE + 7)
/* The server unexpectedly closed the connection prematurely. */ /* The server unexpectedly closed the connection prematurely. */
#define SERF_ERROR_ABORTED_CONNECTION (APR_OS_START_USERERR + \ #define SERF_ERROR_ABORTED_CONNECTION (SERF_ERROR_START + 8)
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 (SERF_ERROR_START + 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 (SERF_ERROR_START + 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 (SERF_ERROR_START + 90)
/* None of the available authn mechanisms for the request are supported */ /* None of the available authn mechanisms for the request are supported */
#define SERF_ERROR_AUTHN_NOT_SUPPORTED (APR_OS_START_USERERR + SERF_ERROR_R ANGE + 91) #define SERF_ERROR_AUTHN_NOT_SUPPORTED (SERF_ERROR_START + 91)
/* 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 (SERF_ERROR_START + 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 (SERF_ERROR_START + 93)
SERF_ERROR_RANGE + 93)
/* Error code reserved for use in the test suite. */
#define SERF_ERROR_ISSUE_IN_TESTSUITE (SERF_ERROR_START + 99)
/* 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)))) ||(SERF_ERROR_TRUNCATED_HTTP_RESPONSE == (status))))
/** /**
* Return a string that describes the specified error code. * Return a string that describes the specified error code.
* *
skipping to change at line 493 skipping to change at line 491
* with APR_SUCCESS. * with APR_SUCCESS.
*/ */
apr_status_t serf_connection_close( apr_status_t serf_connection_close(
serf_connection_t *conn); serf_connection_t *conn);
/** /**
* Sets the maximum number of outstanding requests @a max_requests on the * Sets the maximum number of outstanding requests @a max_requests on the
* connection @a conn. Setting max_requests to 0 means unlimited (the defau lt). * connection @a conn. Setting max_requests to 0 means unlimited (the defau lt).
* Ex.: setting max_requests to 1 means a request is sent when a response o n the * Ex.: setting max_requests to 1 means a request is sent when a response o n the
* previous request was received and handled. * previous request was received and handled.
*
* In general, serf tends to take around 16KB per outstanding request.
*/ */
void serf_connection_set_max_outstanding_requests( void serf_connection_set_max_outstanding_requests(
serf_connection_t *conn, serf_connection_t *conn,
unsigned int max_requests); unsigned int max_requests);
void serf_connection_set_async_responses( void serf_connection_set_async_responses(
serf_connection_t *conn, serf_connection_t *conn,
serf_response_acceptor_t acceptor, serf_response_acceptor_t acceptor,
void *acceptor_baton, void *acceptor_baton,
serf_response_handler_t handler, serf_response_handler_t handler,
skipping to change at line 1048 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 2 #define SERF_MINOR_VERSION 3
#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. 17 change blocks. 
22 lines changed or deleted 22 lines changed or added


 serf_bucket_types.h   serf_bucket_types.h 
skipping to change at line 302 skipping to change at line 302
/** /**
* Equivalent to serf_bucket_simple_create, except that the bucket takes * Equivalent to serf_bucket_simple_create, except that the bucket takes
* ownership of a private copy of the data. * ownership of a private copy of the data.
*/ */
serf_bucket_t *serf_bucket_simple_copy_create( serf_bucket_t *serf_bucket_simple_copy_create(
const char *data, const char *data,
apr_size_t len, apr_size_t len,
serf_bucket_alloc_t *allocator); serf_bucket_alloc_t *allocator);
/**
* Equivalent to serf_bucket_simple_create, except that the bucket assumes
* responsibility for freeing the data on this allocator without making
* a copy. It is assumed that data was created by a call from allocator.
*/
serf_bucket_t *serf_bucket_simple_own_create(
const char *data,
apr_size_t len,
serf_bucket_alloc_t *allocator);
#define SERF_BUCKET_SIMPLE_STRING(s,a) \ #define SERF_BUCKET_SIMPLE_STRING(s,a) \
serf_bucket_simple_create(s, strlen(s), NULL, NULL, a); serf_bucket_simple_create(s, strlen(s), NULL, NULL, a);
#define SERF_BUCKET_SIMPLE_STRING_LEN(s,l,a) \ #define SERF_BUCKET_SIMPLE_STRING_LEN(s,l,a) \
serf_bucket_simple_create(s, l, NULL, NULL, a); serf_bucket_simple_create(s, l, NULL, NULL, a);
/* ==================================================================== */ /* ==================================================================== */
/* Note: apr_mmap_t is always defined, but if APR doesn't have mmaps, then /* Note: apr_mmap_t is always defined, but if APR doesn't have mmaps, then
the caller can never create an apr_mmap_t to pass to this function. */ the caller can never create an apr_mmap_t to pass to this function. */
skipping to change at line 562 skipping to change at line 572
/** /**
* Extract the fields of the subject in a table with keys (E, CN, OU, O, L, * Extract the fields of the subject in a table with keys (E, CN, OU, O, L,
* ST and C). The returned table will be allocated in @a pool. * ST and C). The returned table will be allocated in @a pool.
*/ */
apr_hash_t *serf_ssl_cert_subject( apr_hash_t *serf_ssl_cert_subject(
const serf_ssl_certificate_t *cert, const serf_ssl_certificate_t *cert,
apr_pool_t *pool); apr_pool_t *pool);
/** /**
* Extract the fields of the certificate in a table with keys (sha1, notBef ore, * Extract the fields of the certificate in a table with keys (sha1, notBef ore,
* notAfter). The returned table will be allocated in @a pool. * notAfter, subjectAltName). The returned table will be allocated in @a po ol.
*/ */
apr_hash_t *serf_ssl_cert_certificate( apr_hash_t *serf_ssl_cert_certificate(
const serf_ssl_certificate_t *cert, const serf_ssl_certificate_t *cert,
apr_pool_t *pool); apr_pool_t *pool);
/** /**
* Export a certificate to base64-encoded, zero-terminated string. * Export a certificate to base64-encoded, zero-terminated string.
* The returned string is allocated in @a pool. Returns NULL on failure. * The returned string is allocated in @a pool. Returns NULL on failure.
*/ */
const char *serf_ssl_cert_export( const char *serf_ssl_cert_export(
 End of changes. 2 change blocks. 
1 lines changed or deleted 11 lines changed or added


 serf_bucket_util.h   serf_bucket_util.h 
skipping to change at line 148 skipping to change at line 148
apr_size_t size); apr_size_t size);
/** /**
* Analogous to apr_pstrdup, using a bucket allocator instead. * Analogous to apr_pstrdup, using a bucket allocator instead.
*/ */
char * serf_bstrdup( char * serf_bstrdup(
serf_bucket_alloc_t *allocator, serf_bucket_alloc_t *allocator,
const char *str); const char *str);
/** /**
* Analogous to apr_pstrcatv, using a bucket allocator instead.
*/
char * serf_bstrcatv(
serf_bucket_alloc_t *allocator,
struct iovec *vec,
int vecs,
apr_size_t *bytes_written);
/**
* Read data up to a newline. * Read data up to a newline.
* *
* @a acceptable contains the allowed forms of a newline, and @a found * @a acceptable contains the allowed forms of a newline, and @a found
* will return the particular newline type that was found. If a newline * will return the particular newline type that was found. If a newline
* is not found, then SERF_NEWLINE_NONE will be placed in @a found. * is not found, then SERF_NEWLINE_NONE will be placed in @a found.
* *
* @a data should contain a pointer to the data to be scanned. @a len * @a data should contain a pointer to the data to be scanned. @a len
* should specify the length of that data buffer. On exit, @a data will * should specify the length of that data buffer. On exit, @a data will
* be advanced past the newline, and @a len will specify the remaining * be advanced past the newline, and @a len will specify the remaining
* amount of data in the buffer. * amount of data in the buffer.
 End of changes. 1 change blocks. 
0 lines changed or deleted 9 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/