Author: rhuijben
Date: Thu Nov 19 23:26:05 2015
New Revision: 1715306
URL: http://svn.apache.org/viewvc?rev=1715306&view=rev
Log:
Remove trailing whitespace.
* auth/auth.c
* auth/auth_spnego.c
* auth/auth_spnego.h
* auth/auth_spnego_sspi.c
* buckets/aggregate_buckets.c
* buckets/deflate_buckets.c
* buckets/log_wrapper_buckets.c
* buckets/split_buckets.c
* logging.c
* protocols/fcgi_stream.c
* protocols/http2_buckets.h
* serf_bucket_types.h
* ssltunnel.c
* test/CuTest.c
* test/CuTest.h
* test/MockHTTPinC/MockHTTP.c
* test/MockHTTPinC/MockHTTP.h
* test/MockHTTPinC/MockHTTP_private.h
* test/MockHTTPinC/MockHTTP_server.c
* test/mock_buckets.c
* test/test_auth.c
* test/test_buckets.c
* test/test_context.c
Apply trailing standard whitespace rules.
Modified:
serf/trunk/auth/auth.c
serf/trunk/auth/auth_spnego.c
serf/trunk/auth/auth_spnego.h
serf/trunk/auth/auth_spnego_sspi.c
serf/trunk/buckets/aggregate_buckets.c
serf/trunk/buckets/deflate_buckets.c
serf/trunk/buckets/log_wrapper_buckets.c
serf/trunk/buckets/split_buckets.c
serf/trunk/logging.c
serf/trunk/protocols/fcgi_stream.c
serf/trunk/protocols/http2_buckets.h
serf/trunk/serf_bucket_types.h
serf/trunk/ssltunnel.c
serf/trunk/test/CuTest.c
serf/trunk/test/CuTest.h
serf/trunk/test/MockHTTPinC/MockHTTP.c
serf/trunk/test/MockHTTPinC/MockHTTP.h
serf/trunk/test/MockHTTPinC/MockHTTP_private.h
serf/trunk/test/MockHTTPinC/MockHTTP_server.c
serf/trunk/test/mock_buckets.c
serf/trunk/test/test_auth.c
serf/trunk/test/test_buckets.c
serf/trunk/test/test_context.c
Modified: serf/trunk/auth/auth.c
URL:
http://svn.apache.org/viewvc/serf/trunk/auth/auth.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/auth/auth.c (original)
+++ serf/trunk/auth/auth.c Thu Nov 19 23:26:05 2015
@@ -29,10 +29,10 @@
/* These authentication schemes are in order of decreasing security, the
topmost
scheme will be used first when the server supports it.
-
+
Each set of handlers should support both server (401) and proxy (407)
authentication.
-
+
Use lower case for the scheme names to enable case insensitive matching.
*/
static const serf__authn_scheme_t *serf_authn_schemes[] = {
@@ -275,7 +275,7 @@ static apr_status_t dispatch_auth(int co
return APR_SUCCESS;
}
-/* Read the headers of the response and try the available handlers if
+/* Read the headers of the response and try the available handlers if
authentication or validation is needed.
*CONSUMED_RESPONSE will be 1 if authentication is involved (either a 401/407
response or a response with an authn header), 0 otherwise. */
@@ -320,7 +320,7 @@ apr_status_t serf__handle_auth_response(
again when more data is received. */
status = discard_body(response);
*consumed_response = 1;
-
+
/* Discard all response body before processing authentication. */
if (!APR_STATUS_IS_EOF(status)) {
return status;
Modified: serf/trunk/auth/auth_spnego.c
URL:
http://svn.apache.org/viewvc/serf/trunk/auth/auth_spnego.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/auth/auth_spnego.c (original)
+++ serf/trunk/auth/auth_spnego.c Thu Nov 19 23:26:05 2015
@@ -80,7 +80,7 @@
*
* Note: It's possible that the server returns 401 again in step 2, if the
* Kerberos context isn't complete yet. This means there is 3rd step
- * where we'll send a request with an Authorization header to the
+ * where we'll send a request with an Authorization header to the
* server. Some (simple) tests with mod_auth_kerb and MIT Kerberos 5 show
* this never happens.
*
@@ -106,7 +106,7 @@ typedef enum gss_api_auth_state {
authn_persistence_state_t: state that indicates if we are talking with a
server that requires authentication only of the first request (stateful),
or of each request (stateless).
-
+
INIT: Begin state. Authenticating the first request on this connection.
UNDECIDED: we haven't identified the server yet, assume STATEFUL for now.
Pipeline mode disabled, requests are sent only after the response off the
@@ -292,7 +292,7 @@ do_auth(const serf__authn_scheme_t *sche
}
} else {
/* This is a new request, not a retry in response to a 40x of the
- host/proxy.
+ host/proxy.
Only add the Authorization header if we know the server requires
per-request authentication (stateless). */
if (gss_info->pstate != pstate_stateless)
@@ -377,7 +377,7 @@ serf__init_spnego_connection(const serf_
serf__authn_info_t *authn_info;
gss_authn_info_t *gss_info = NULL;
- /* For proxy authentication, reuse the gss context for all connections.
+ /* For proxy authentication, reuse the gss context for all connections.
For server authentication, create a new gss context per connection. */
if (code == 401) {
authn_info = &conn->authn_info;
Modified: serf/trunk/auth/auth_spnego.h
URL:
http://svn.apache.org/viewvc/serf/trunk/auth/auth_spnego.h?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/auth/auth_spnego.h (original)
+++ serf/trunk/auth/auth_spnego.h Thu Nov 19 23:26:05 2015
@@ -111,7 +111,7 @@ serf__spnego_init_sec_context(serf_conne
*/
apr_status_t
serf__spnego_reset_sec_context(serf__spnego_context_t *ctx);
-
+
#ifdef __cplusplus
}
#endif
Modified: serf/trunk/auth/auth_spnego_sspi.c
URL:
http://svn.apache.org/viewvc/serf/trunk/auth/auth_spnego_sspi.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/auth/auth_spnego_sspi.c (original)
+++ serf/trunk/auth/auth_spnego_sspi.c Thu Nov 19 23:26:05 2015
@@ -254,7 +254,7 @@ serf__spnego_init_sec_context(serf_conne
/* Prepare input buffer description. */
sspi_in_buffer.BufferType = SECBUFFER_TOKEN;
sspi_in_buffer.pvBuffer = input_buf->value;
- sspi_in_buffer.cbBuffer = input_buf->length;
+ sspi_in_buffer.cbBuffer = input_buf->length;
sspi_in_buffer_desc.cBuffers = 1;
sspi_in_buffer_desc.pBuffers = &sspi_in_buffer;
@@ -262,7 +262,7 @@ serf__spnego_init_sec_context(serf_conne
/* Output buffers. Output buffer will be allocated by system. */
sspi_out_buffer.BufferType = SECBUFFER_TOKEN;
- sspi_out_buffer.pvBuffer = NULL;
+ sspi_out_buffer.pvBuffer = NULL;
sspi_out_buffer.cbBuffer = 0;
sspi_out_buffer_desc.cBuffers = 1;
Modified: serf/trunk/buckets/aggregate_buckets.c
URL:
http://svn.apache.org/viewvc/serf/trunk/buckets/aggregate_buckets.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/buckets/aggregate_buckets.c (original)
+++ serf/trunk/buckets/aggregate_buckets.c Thu Nov 19 23:26:05 2015
@@ -171,7 +171,7 @@ void serf_bucket_aggregate_append(
serf_bucket_set_config(append_bucket, ctx->config);
}
-void serf_bucket_aggregate_hold_open(serf_bucket_t *aggregate_bucket,
+void serf_bucket_aggregate_hold_open(serf_bucket_t *aggregate_bucket,
serf_bucket_aggregate_eof_t fn,
void *baton)
{
Modified: serf/trunk/buckets/deflate_buckets.c
URL:
http://svn.apache.org/viewvc/serf/trunk/buckets/deflate_buckets.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/buckets/deflate_buckets.c (original)
+++ serf/trunk/buckets/deflate_buckets.c Thu Nov 19 23:26:05 2015
@@ -323,7 +323,7 @@ static apr_status_t serf_deflate_refill(
bucket->allocator,
DEFLATE_VERIFY_SIZE);
- verify_header[0] = ctx->crc & 0xFF;
+ verify_header[0] = ctx->crc & 0xFF;
verify_header[1] = (ctx->crc >> 8) & 0xFF;
verify_header[2] = (ctx->crc >> 16) & 0xFF;
verify_header[3] = (ctx->crc >> 24) & 0xFF;
Modified: serf/trunk/buckets/log_wrapper_buckets.c
URL:
http://svn.apache.org/viewvc/serf/trunk/buckets/log_wrapper_buckets.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/buckets/log_wrapper_buckets.c (original)
+++ serf/trunk/buckets/log_wrapper_buckets.c Thu Nov 19 23:26:05 2015
@@ -149,7 +149,7 @@ serf_bucket_t *serf__bucket_log_wrapper_
{
/* ### This code currently breaks SERF_BUCKET_IS_XXXX() on the bucket.
So to avoid many false warnings we disable it when using
- SERF_DEBUG_BUCKET_USE
+ SERF_DEBUG_BUCKET_USE
*/
#if defined(SERF_LOGGING_ENABLED) && !defined(SERF_DEBUG_BUCKET_USE)
serf_log_wrapped_bucket_t *bkt = serf_bucket_mem_alloc(alloc,
sizeof(*bkt));
Modified: serf/trunk/buckets/split_buckets.c
URL:
http://svn.apache.org/viewvc/serf/trunk/buckets/split_buckets.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/buckets/split_buckets.c (original)
+++ serf/trunk/buckets/split_buckets.c Thu Nov 19 23:26:05 2015
@@ -57,7 +57,7 @@ static void split_detach_head(split_stre
ctx->head = sctx->next;
sctx->next->prev = NULL;
- /* Did somebody ask for the size while it wasn't possible?
+ /* Did somebody ask for the size while it wasn't possible?
Perhaps we can retrieve and store it now */
if (ctx->want_size) {
ctx->want_size = false;
Modified: serf/trunk/logging.c
URL:
http://svn.apache.org/viewvc/serf/trunk/logging.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/logging.c (original)
+++ serf/trunk/logging.c Thu Nov 19 23:26:05 2015
@@ -232,7 +232,7 @@ static apr_status_t log_to_stream_output
fprintf(logfp, "%s", remoteip);
}
fprintf(logfp, "] ");
-
+
if (prefix)
fprintf(logfp, "%s: ", prefix);
}
Modified: serf/trunk/protocols/fcgi_stream.c
URL:
http://svn.apache.org/viewvc/serf/trunk/protocols/fcgi_stream.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/protocols/fcgi_stream.c (original)
+++ serf/trunk/protocols/fcgi_stream.c Thu Nov 19 23:26:05 2015
@@ -1,22 +1,22 @@
/* ====================================================================
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-* ====================================================================
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ */
#include <stdlib.h>
Modified: serf/trunk/protocols/http2_buckets.h
URL:
http://svn.apache.org/viewvc/serf/trunk/protocols/http2_buckets.h?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/protocols/http2_buckets.h (original)
+++ serf/trunk/protocols/http2_buckets.h Thu Nov 19 23:26:05 2015
@@ -148,9 +148,9 @@ typedef int (serf_bucket_hpack_do_callba
apr_size_t value_len);
/**
- * Iterates over all headers of the message and invokes the callback
+ * Iterates over all headers of the message and invokes the callback
* function with header key and value. Stop iterating when no more
- * headers are available or when the callback function returned a
+ * headers are available or when the callback function returned a
* non-0 value.
*
* @param headers_bucket headers to iterate over
Modified: serf/trunk/serf_bucket_types.h
URL:
http://svn.apache.org/viewvc/serf/trunk/serf_bucket_types.h?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/serf_bucket_types.h (original)
+++ serf/trunk/serf_bucket_types.h Thu Nov 19 23:26:05 2015
@@ -239,8 +239,8 @@ typedef apr_status_t (*serf_bucket_aggre
serf_bucket_t *aggregate_bucket);
/** serf_bucket_aggregate_cleanup will instantly destroy all buckets in
- the aggregate bucket that have been read completely. Whereas normally,
- these buckets are destroyed on every read operation. */
+ the aggregate bucket that have been read completely. Whereas normally,
+ these buckets are destroyed on every read operation. */
void serf_bucket_aggregate_cleanup(
serf_bucket_t *bucket,
serf_bucket_alloc_t *allocator);
@@ -262,7 +262,7 @@ void serf_bucket_aggregate_prepend(
void serf_bucket_aggregate_append(
serf_bucket_t *aggregate_bucket,
serf_bucket_t *append_bucket);
-
+
void serf_bucket_aggregate_hold_open(
serf_bucket_t *aggregate_bucket,
serf_bucket_aggregate_eof_t fn,
@@ -303,7 +303,7 @@ serf_bucket_t *serf_bucket_socket_create
* Call @a progress_func every time bytes are read from the socket, pass
* the number of bytes read.
*
- * When using serf's bytes read & written progress indicator, pass
+ * When using serf's bytes read & written progress indicator, pass
* @a serf_context_progress_delta for progress_func and the serf_context for
* progress_baton.
*/
@@ -454,9 +454,9 @@ typedef int (serf_bucket_headers_do_call
const char *value);
/**
- * Iterates over all headers of the message and invokes the callback
+ * Iterates over all headers of the message and invokes the callback
* function with header key and value. Stop iterating when no more
- * headers are available or when the callback function returned a
+ * headers are available or when the callback function returned a
* non-0 value.
*
* @param headers_bucket headers to iterate over
@@ -556,7 +556,7 @@ typedef apr_status_t (*serf_ssl_need_cer
/* Callback type for server certificate status info and OCSP responses.
Note that CERT can be NULL in case its called from the OCSP callback. */
typedef apr_status_t (*serf_ssl_need_server_cert_t)(
- void *data,
+ void *data,
int failures,
const serf_ssl_certificate_t *cert);
@@ -580,7 +580,7 @@ void serf_ssl_client_cert_password_set(
void *cache_pool);
/**
- * Set a callback to override the default SSL server certificate validation
+ * Set a callback to override the default SSL server certificate validation
* algorithm.
*/
void serf_ssl_server_cert_callback_set(
@@ -589,8 +589,8 @@ void serf_ssl_server_cert_callback_set(
void *data);
/**
- * Set callbacks to override the default SSL server certificate validation
- * algorithm for the current certificate or the entire certificate chain.
+ * Set callbacks to override the default SSL server certificate validation
+ * algorithm for the current certificate or the entire certificate chain.
*/
void serf_ssl_server_cert_chain_callback_set(
serf_ssl_context_t *context,
@@ -642,7 +642,7 @@ int serf_ssl_cert_depth(
const serf_ssl_certificate_t *cert);
/**
- * Extract the fields of the issuer in a table with keys (E, CN, OU, O, L,
+ * Extract the fields of the issuer in a table with keys (E, CN, OU, O, L,
* ST and C). The returned table will be allocated in @a pool.
*/
apr_hash_t *serf_ssl_cert_issuer(
@@ -650,7 +650,7 @@ apr_hash_t *serf_ssl_cert_issuer(
apr_pool_t *pool);
/**
- * 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.
*/
apr_hash_t *serf_ssl_cert_subject(
@@ -684,15 +684,15 @@ apr_status_t serf_ssl_load_cert_file(
apr_pool_t *pool);
/**
- * Adds the certificate @a cert to the list of trusted certificates in
- * @a ssl_ctx that will be used for verification.
+ * Adds the certificate @a cert to the list of trusted certificates in
+ * @a ssl_ctx that will be used for verification.
* See also @a serf_ssl_load_cert_file.
*/
apr_status_t serf_ssl_trust_cert(
serf_ssl_context_t *ssl_ctx,
serf_ssl_certificate_t *cert);
-/**
+/**
* Load a CRL .pem file from @a file_path and enable CRL checking.
*/
apr_status_t serf_ssl_add_crl_from_file(serf_ssl_context_t *ssl_ctx,
Modified: serf/trunk/ssltunnel.c
URL:
http://svn.apache.org/viewvc/serf/trunk/ssltunnel.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/ssltunnel.c (original)
+++ serf/trunk/ssltunnel.c Thu Nov 19 23:26:05 2015
@@ -113,7 +113,7 @@ static apr_status_t handle_response(serf
/* If there was outgoing data waiting, we can't use it
any more. It's lifetime is limited by ostream_head
... (There shouldn't be any, as we disabled pipelining) */
- conn->pump.vec_len = 0;
+ conn->pump.vec_len = 0;
conn->state = SERF_CONN_CONNECTED;
Modified: serf/trunk/test/CuTest.c
URL:
http://svn.apache.org/viewvc/serf/trunk/test/CuTest.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/CuTest.c (original)
+++ serf/trunk/test/CuTest.c Thu Nov 19 23:26:05 2015
@@ -1,22 +1,22 @@
-/*
+/*
* Copyright (c) 2003 Asim Jalis
- *
+ *
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any
* damages arising from the use of this software.
- *
+ *
* Permission is granted to anyone to use this software for any
* purpose, including commercial applications, and to alter it and
* redistribute it freely, subject to the following restrictions:
- *
+ *
* 1. The origin of this software must not be misrepresented; you
* must not claim that you wrote the original software. If you use
* this software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
- *
+ *
* 2. Altered source versions must be plainly marked as such, and
* must not be misrepresented as being the original software.
- *
+ *
* 3. This notice may not be removed or altered from any source
* distribution.
*-------------------------------------------------------------------------*
@@ -411,4 +411,4 @@ void CuSuiteSetSetupTeardownCallbacks(Cu
{
testSuite->setup = setup;
testSuite->teardown = teardown;
-}
\ No newline at end of file
+}
Modified: serf/trunk/test/CuTest.h
URL:
http://svn.apache.org/viewvc/serf/trunk/test/CuTest.h?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/CuTest.h (original)
+++ serf/trunk/test/CuTest.h Thu Nov 19 23:26:05 2015
@@ -1,22 +1,22 @@
-/*
+/*
* Copyright (c) 2003 Asim Jalis
- *
+ *
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any
* damages arising from the use of this software.
- *
+ *
* Permission is granted to anyone to use this software for any
* purpose, including commercial applications, and to alter it and
* redistribute it freely, subject to the following restrictions:
- *
+ *
* 1. The origin of this software must not be misrepresented; you
* must not claim that you wrote the original software. If you use
* this software in a product, an acknowledgment in the product
* documentation would be appreciated but is not required.
- *
+ *
* 2. Altered source versions must be plainly marked as such, and
* must not be misrepresented as being the original software.
- *
+ *
* 3. This notice may not be removed or altered from any source
* distribution.
*-------------------------------------------------------------------------*
Modified: serf/trunk/test/MockHTTPinC/MockHTTP.c
URL:
http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/MockHTTP.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/MockHTTPinC/MockHTTP.c (original)
+++ serf/trunk/test/MockHTTPinC/MockHTTP.c Thu Nov 19 23:26:05 2015
@@ -42,9 +42,9 @@ void setHeader(apr_table_t *hdrs, const
}
/* To enable calls like Assert(expected, Verify...(), ErrorMessage()), with the
- evaluation order of the arguments not specified in C, we need the pointer
to
+ evaluation order of the arguments not specified in C, we need the pointer to
where an error message will be stored before the call to Verify...().
- So we allocate up to ERRMSG_MAXSIZE bytes for the error message memory up
+ So we allocate up to ERRMSG_MAXSIZE bytes for the error message memory up
front and use it when needed */
#define ERRMSG_MAXSIZE 65000
@@ -125,7 +125,7 @@ void mhCleanup(MockHTTP *mh)
* as there's data to read or write.
*
* reqState: NoReqsReceived if no requests were received
- * PartialReqReceived if either proxy or server blocks on a partly
+ * PartialReqReceived if either proxy or server blocks on a partly
* read request.
* FullReqReceived if all requests have been read completely.
*/
@@ -527,9 +527,9 @@ mhMatchHeaderEqualTo(const MockHTTP *mh,
}
/**
- * Builder callback, checks if a header's value is not equal to the expected
+ * Builder callback, checks if a header's value is not equal to the expected
* value.
- * When a header isn't set its value will be NULL, so a non-NULL check can be
+ * When a header isn't set its value will be NULL, so a non-NULL check can be
* used to check if the header exists.
*/
static bool
Modified: serf/trunk/test/MockHTTPinC/MockHTTP.h
URL:
http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/MockHTTP.h?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/MockHTTPinC/MockHTTP.h (original)
+++ serf/trunk/test/MockHTTPinC/MockHTTP.h Thu Nov 19 23:26:05 2015
@@ -27,7 +27,7 @@ extern "C" {
/* TODO: define all macro's with mh prefix, + create shortcuts with flag to
not define this (in case of conflicts with other code ) */
/* TODO: connection level checks:
- - ssl related: client certificate, handshake successful,
+ - ssl related: client certificate, handshake successful,
- authn: Negotiate, NTLM, Kerberos */
typedef enum mhServerType_t {
@@ -166,7 +166,7 @@ typedef struct mhResponseBldr_t mhRespon
#define InSeparateThread\
mhSetServerThreading(__servctx, mhThreadSeparate)
-/* Runs the mock server and proxy in the main thread, use this when testing a
+/* Runs the mock server and proxy in the main thread, use this when testing a
non-blocking http client library.
This is the default. */
#define InMainThread\
@@ -384,7 +384,7 @@ typedef struct mhResponseBldr_t mhRespon
#define WithBody(x)\
mhRespSetBody(__resp, (x))
-/* Set the chunked body of a response. This will automatically add a
+/* Set the chunked body of a response. This will automatically add a
Transfer-Encoding: chunked header.
e.g. WithChunkedBody("chunk1", "chunk2") */
#define WithChunkedBody(...)\
@@ -412,7 +412,7 @@ typedef struct mhResponseBldr_t mhRespon
mhRespSetBodyPattern(__resp, (pattern), (repeat))
#define EndGiven\
- /* Assign local variables to NULL to avoid 'variable unused'
+ /* Assign local variables to NULL to avoid 'variable unused'
warnings. */\
(void)__resp; (void)__rm; (void)__mh;\
}
@@ -456,7 +456,7 @@ typedef struct mhResponseBldr_t mhRespon
#define VerifyAllRequestsReceived\
mhVerifyAllRequestsReceived(__mh)
-/* Verify that all stubbed requests where received once by the serer, in the
+/* Verify that all stubbed requests where received once by the serer, in the
order in which they were defined. */
#define VerifyAllRequestsReceivedInOrder\
mhVerifyAllRequestsReceivedInOrder(__mh)
@@ -506,7 +506,7 @@ typedef struct mhStats_t {
*/
unsigned int requestsReceived;
- /* Number of requests the server responded to. This includes default
+ /* Number of requests the server responded to. This includes default
responses or 500 Internal Server Error responses */
unsigned int requestsResponded;
@@ -534,7 +534,7 @@ typedef struct MockHTTP MockHTTP;
/**
* Initialize a MockHTTP context.
- *
+ *
* This context manages the server(s), stubs, expectations of a test. It also
* manages one pool of memory which only gets freed when this context is
* cleaned up, so a MockHTTP context should be short-lived.
@@ -564,7 +564,7 @@ mhError_t mhRunServerLoopCompleteRequest
*
* Returns:
* MOCKHTTP_NO_ERROR if there's nothing more to be done at this time
- * MOCKHTTP_TIMEOUT maximum timeout exceeded when waiting for a complete
+ * MOCKHTTP_TIMEOUT maximum timeout exceeded when waiting for a complete
* request
*/
mhError_t mhRunServerLoop(MockHTTP *mh);
Modified: serf/trunk/test/MockHTTPinC/MockHTTP_private.h
URL:
http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/MockHTTP_private.h?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/MockHTTPinC/MockHTTP_private.h (original)
+++ serf/trunk/test/MockHTTPinC/MockHTTP_private.h Thu Nov 19 23:26:05 2015
@@ -144,7 +144,7 @@ struct mhServCtx_t {
apr_array_header_t *reqMatchers; /* array of ReqMatcherRespPair_t *'s */
apr_array_header_t *incompleteReqMatchers; /* .... same type */
};
-
+
typedef enum reqReadState_t {
ReadStateStatusLine = 0,
Modified: serf/trunk/test/MockHTTPinC/MockHTTP_server.c
URL:
http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/MockHTTP_server.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/MockHTTPinC/MockHTTP_server.c (original)
+++ serf/trunk/test/MockHTTPinC/MockHTTP_server.c Thu Nov 19 23:26:05 2015
@@ -139,7 +139,7 @@ static void * APR_THREAD_FUNC run_thread
}
/**
- * Callback called when the mhServCtx_t pool is destroyed.
+ * Callback called when the mhServCtx_t pool is destroyed.
*/
static apr_status_t cleanupServer(void *baton)
{
@@ -147,7 +147,7 @@ static apr_status_t cleanupServer(void *
apr_status_t status = APR_SUCCESS;
/* If mhCleanup() wasn't called before pool cleanup, the server is still
- running. Stop it here to avoid a crash, but this will result in a
+ running. Stop it here to avoid a crash, but this will result in a
(currently unidentified) pool cleanup crash.
Conclusion: Always run mhCleanup() at the end of a test!
*/
@@ -259,7 +259,7 @@ static apr_status_t setupTCPServer(mhSer
}
/**
- * Opens a non-blocking connection to a remote server at URL (in form
+ * Opens a non-blocking connection to a remote server at URL (in form
* localhost:30080).
*/
static apr_status_t connectToServer(mhServCtx_t *ctx, _mhClientCtx_t *cctx)
@@ -655,7 +655,7 @@ readHeader(bucket_t *bkt, mhRequest_t *r
}
/**
- * Append a block of data in BUF of length LEN (not-'\0' terminated) to the
+ * Append a block of data in BUF of length LEN (not-'\0' terminated) to the
* list in REQ. Data will be copied in the REQ->pool.
*/
static void
@@ -713,7 +713,7 @@ static apr_status_t readBody(bucket_t *b
/**
* Reads a chunk of the body from the buffer in CCTX. The length
- * of the body is determined by reading the chunk header, length of current
+ * of the body is determined by reading the chunk header, length of current
* chunk and partial read data will be stored in REQ->chunks.
* The chunk will be copied in REQ->pool and stored in REQ.
*
@@ -834,7 +834,7 @@ static apr_status_t readChunk(bucket_t *
* Keeps reading chunks until no more data is available.
*
* Returns APR_EAGAIN if a chunk isn't completely available.
- * APR_SUCCESS + *DONE = YES when the last chunk and the trailer were
+ * APR_SUCCESS + *DONE = YES when the last chunk and the trailer were
* read.
* error in case of problems parsing the chunk header, length or
trailer.
*/
@@ -857,7 +857,7 @@ readChunked(bucket_t *bkt, mhRequest_t *
*
* Returns APR_EAGAIN: wait for more data
* APR_EOF: request received, or no more data available.
- * MH_STATUS_INCOMPLETE_REQUEST: APR_EOF but the request wasn't
received
+ * MH_STATUS_INCOMPLETE_REQUEST: APR_EOF but the request wasn't
received
* completely.
*/
static apr_status_t readRequest(_mhClientCtx_t *cctx, mhRequest_t **preq)
@@ -1194,7 +1194,7 @@ _mhMatchRequest(const mhServCtx_t *ctx,
}
/**
- * Tries to match an incomplete (partial) request REQ with the list of
+ * Tries to match an incomplete (partial) request REQ with the list of
* incomplete request matchers.
* Returns NO if the request wasn't matched.
* YES + *RESP + *ACTION if the request was matched successfully.
@@ -1716,7 +1716,7 @@ mhServCtx_t *mhFindServerByID(const Mock
}
/**
- * Takes a list of builders of type mhServerSetupBldr_t *'s and executes them
+ * Takes a list of builders of type mhServerSetupBldr_t *'s and executes them
* one by one (in the order they are passed as arguments) to configure the
* server SERV_CTX.
*/
@@ -1832,7 +1832,7 @@ mhServerSetupBldr_t *mhSetServerID(mhSer
}
/**
- * Builder callback, sets the number of maximum requests per connection on
+ * Builder callback, sets the number of maximum requests per connection on
* server CTX.
*/
static bool
@@ -1843,7 +1843,7 @@ set_server_maxreqs_per_conn(const mhServ
}
/**
- * Create a builder of type mhServerSetupBldr_t, sets the number of maximum
+ * Create a builder of type mhServerSetupBldr_t, sets the number of maximum
* requests per connection.
*/
mhServerSetupBldr_t *
@@ -2040,7 +2040,7 @@ mhSetServerCertKeyFile(mhServCtx_t *ctx,
}
/**
- * Builder callback, sets the passphrase to be used to decrypt the private key
+ * Builder callback, sets the passphrase to be used to decrypt the private key
* file on server CTX.
*/
static bool
@@ -2417,7 +2417,7 @@ static int ocspCreateResponse(OCSP_RESPO
/**
* OpenSSL callback, executed on the server when the client has enabled OCSP
- * support. If an OCSP responder was defined in the test, call it now with an
+ * support. If an OCSP responder was defined in the test, call it now with an
* OCSP request to get an OCSP response that can be returned to the client.
*/
static int ocspStatusCallback(SSL *ssl, void *userdata)
@@ -2630,7 +2630,7 @@ static apr_status_t initSSLCtx(_mhClient
if (cctx->protocols == mhProtoSSLv2) {
/* In recent versions of OpenSSL, SSLv2 has been disabled by
removing
- all SSLv2 ciphers from the cipher string.
+ all SSLv2 ciphers from the cipher string.
If SSLv2 is the only protocol this test wants to be enabled,
re-add the SSLv2 ciphers. */
SSL_CTX_set_cipher_list(ssl_ctx->ctx, "SSLv2");
@@ -2638,7 +2638,7 @@ static apr_status_t initSSLCtx(_mhClient
}
/* Always set this callback, even if no passphrase is set. Otherwise
- OpenSSL will prompt the user to provide a passphrase if one is
+ OpenSSL will prompt the user to provide a passphrase if one is
needed. */
SSL_CTX_set_default_passwd_cb(ssl_ctx->ctx, pem_passwd_cb);
SSL_CTX_set_default_passwd_cb_userdata(ssl_ctx->ctx, cctx);
@@ -2764,7 +2764,7 @@ sslSocketWrite(_mhClientCtx_t *cctx, con
if (result == 0)
return APR_EAGAIN;
-
+
return ssl_ctx->bio_status ? ssl_ctx->bio_status : APR_EGENERAL;
}
Modified: serf/trunk/test/mock_buckets.c
URL:
http://svn.apache.org/viewvc/serf/trunk/test/mock_buckets.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/mock_buckets.c (original)
+++ serf/trunk/test/mock_buckets.c Thu Nov 19 23:26:05 2015
@@ -165,7 +165,7 @@ static apr_status_t serf_mock_peek(serf_
/* An action { "", 0, APR_EAGAIN } means that serf should exit serf_context_run
and pass the buck back to the application. As long as no new data arrives,
this action remains active.
-
+
This function allows the 'application' to trigger the arrival of more data.
If the current action is { "", 0, APR_EAGAIN }, reduce the number of times
the action should run by one, and proceed with the next action if needed.
@@ -258,7 +258,7 @@ static void test_basic_mock_bucket(CuTes
expected += len;
} while(!APR_STATUS_IS_EOF(status));
-
+
CuAssert(tc, "Read less data than expected.", strlen(expected) == 0);
serf_bucket_destroy(mock_bkt);
}
Modified: serf/trunk/test/test_auth.c
URL:
http://svn.apache.org/viewvc/serf/trunk/test/test_auth.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/test_auth.c (original)
+++ serf/trunk/test/test_auth.c Thu Nov 19 23:26:05 2015
@@ -259,10 +259,10 @@ static void digest_authentication(CuTest
correctly. */
num_requests_sent = 1;
-
+
/* Expected string relies on strict order of attributes of Digest, which
are
not guaranteed.
- 6ff0d4cc201513ce970d5c6b25e1043b is encoded as:
+ 6ff0d4cc201513ce970d5c6b25e1043b is encoded as:
md5hex(md5hex("serf:Test Suite:serftest") & ":" &
md5hex("ABCDEF1234567890") & ":" &
md5hex("GET:/test/index.html"))
Modified: serf/trunk/test/test_buckets.c
URL:
http://svn.apache.org/viewvc/serf/trunk/test/test_buckets.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/test_buckets.c (original)
+++ serf/trunk/test/test_buckets.c Thu Nov 19 23:26:05 2015
@@ -202,7 +202,7 @@ static void test_simple_bucket_readline(
int found;
apr_size_t len;
const char *body;
-
+
serf_bucket_alloc_t *alloc = test__create_bucket_allocator(tc, tb->pool);
bkt = SERF_BUCKET_SIMPLE_STRING(
@@ -268,7 +268,7 @@ static void test_simple_bucket_readline(
#if 0
/* TODO: looks like a bug, CRLF acceptable on buffer with CR returns
- SERF_NEWLINE_CRLF_SPLIT, but here that CR comes at the end of the
+ SERF_NEWLINE_CRLF_SPLIT, but here that CR comes at the end of the
buffer (APR_EOF), so should have been SERF_NEWLINE_NONE! */
bkt = SERF_BUCKET_SIMPLE_STRING("line1" CR, alloc);
readlines_and_check_bucket(tc, bkt, SERF_NEWLINE_CRLF, "line1" CR, 1);
@@ -949,7 +949,7 @@ static void test_response_body_too_small
CRLF
BODY,
alloc);
-
+
bkt = serf_bucket_response_create(tmp, alloc);
{
@@ -1148,7 +1148,7 @@ static void test_response_bucket_peek_at
CuAssertIntEquals(tc, 200, sl.code);
CuAssertStrEquals(tc, "OK", sl.reason);
CuAssertIntEquals(tc, SERF_HTTP_11, sl.version);
-
+
/* Ensure that the status line & headers are read in the response_bucket.
*/
status = serf_bucket_response_wait_for_headers(resp_bkt1);
CuAssert(tc, "Unexpected error when waiting for response headers",
@@ -1222,7 +1222,7 @@ static void test_copy_bucket(CuTest *tc)
CuAssertIntEquals(tc, strlen(BODY),
(int)serf_bucket_get_remaining(aggbkt));
- CuAssertIntEquals(tc, strlen(BODY),
+ CuAssertIntEquals(tc, strlen(BODY),
(int)serf_bucket_get_remaining(copybkt));
/* When < min_size, everything should be read in one go */
@@ -1710,7 +1710,7 @@ static apr_status_t deflate_compress(con
serf_bucket_mem_free(alloc, write_buf);
*data = "";
}
-
+
return APR_SUCCESS;
}
@@ -1886,7 +1886,7 @@ create_gzip_deflate_bucket(serf_bucket_t
return defbkt;
}
-/* Test for issue #152: the trailers of gzipped data only store the 4 most
+/* Test for issue #152: the trailers of gzipped data only store the 4 most
significant bytes of the length, so when the compressed data is >4GB
we can't just compare actual length with expected length. */
static void test_deflate_4GBplus_buckets(CuTest *tc)
@@ -2004,7 +2004,7 @@ static void test_linebuf_fetch_crlf(CuTe
serf_bucket_t *bkt;
serf_linebuf_t linebuf;
serf_bucket_type_t *unfriendly;
-
+
serf_bucket_alloc_t *alloc = test__create_bucket_allocator(tc, tb->pool);
bkt = serf_bucket_mock_create(actions, sizeof(actions)/sizeof(actions[0]),
@@ -2750,7 +2750,7 @@ static void test_hpack_huffman_encode(Cu
sizeof(encoded),
encoded, &encoded_len));
/* Nice.. need 583 bytes to encode these 256 bytes :-) */
- CuAssertIntEquals(tc, 583, encoded_len);
+ CuAssertIntEquals(tc, 583, encoded_len);
text[256] = 0xFE;
CuAssertIntEquals(tc, 0,
serf__hpack_huffman_decode(encoded, encoded_len,
@@ -2906,7 +2906,7 @@ CuSuite *test_buckets(void)
SUITE_ADD_TEST(suite, test_deflate_4GBplus_buckets);
#endif
-
+
return suite;
}
Modified: serf/trunk/test/test_context.c
URL:
http://svn.apache.org/viewvc/serf/trunk/test/test_context.c?rev=1715306&r1=1715305&r2=1715306&view=diff
==============================================================================
--- serf/trunk/test/test_context.c (original)
+++ serf/trunk/test/test_context.c Thu Nov 19 23:26:05 2015
@@ -275,7 +275,7 @@ static void test_eof_connection_with_aut
}
/* Test that serf correctly handles aborted connections. This can happen
- on Windows when the server (cleanly) closes the connection, and where it
+ on Windows when the server (cleanly) closes the connection, and where it
happens between responses, it should be handled as a normal connection
closure. */
static void test_aborted_connection(CuTest *tc)
@@ -439,7 +439,7 @@ static void test_keepalive_limit_one_by_
CuAssertIntEquals(tc, APR_SUCCESS, status);
/* Reduce the bandwidth to one at a time. The first request will be resend
- twice as priority requests, so iff the bandwidth reduction is in effect
+ twice as priority requests, so iff the bandwidth reduction is in effect
these should be sent before all other requests. */
serf_connection_set_max_outstanding_requests(tb->connection, 1);
@@ -946,7 +946,7 @@ static void test_max_keepalive_requests(
ConfigServerWithID("server", WithMaxKeepAliveRequests(4))
EndInit
- /* We will NUM_REQUESTS requests to the mock server, close connection
after
+ /* We will NUM_REQUESTS requests to the mock server, close connection after
every 4th response. */
Given(tb->mh)
DefaultResponse(WithCode(200), WithRequestBody)