serf.h (1.2.1) | | serf.h (1.3.0) |
| | |
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 (1.2.1) | | serf_bucket_types.h (1.3.0) |
| | |
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 |
|