mod_echo.c revision b931e2cf90d43b0894c2e2927a2a42aca46f277e
842ae4bd224140319ae7feec1872b93dfd491143fielding/* Licensed to the Apache Software Foundation (ASF) under one or more
842ae4bd224140319ae7feec1872b93dfd491143fielding * contributor license agreements. See the NOTICE file distributed with
842ae4bd224140319ae7feec1872b93dfd491143fielding * this work for additional information regarding copyright ownership.
842ae4bd224140319ae7feec1872b93dfd491143fielding * The ASF licenses this file to You under the Apache License, Version 2.0
842ae4bd224140319ae7feec1872b93dfd491143fielding * (the "License"); you may not use this file except in compliance with
842ae4bd224140319ae7feec1872b93dfd491143fielding * the License. You may obtain a copy of the License at
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * Unless required by applicable law or agreed to in writing, software
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * distributed under the License is distributed on an "AS IS" BASIS,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * See the License for the specific language governing permissions and
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * limitations under the License.
6e8fa9b44c6d5f5b3ac9dab52c4734259bcd8335coartypedef struct {
6e8fa9b44c6d5f5b3ac9dab52c4734259bcd8335coarstatic void *create_echo_server_config(apr_pool_t *p, server_rec *s)
e4afb803ff9a51f9ec7969f232b7fd4a4e94d5d4rbbstatic const char *echo_on(cmd_parms *cmd, void *dummy, int arg)
6e8fa9b44c6d5f5b3ac9dab52c4734259bcd8335coar EchoConfig *pConfig = ap_get_module_config(cmd->server->module_config,
6e8fa9b44c6d5f5b3ac9dab52c4734259bcd8335coar EchoConfig *pConfig = ap_get_module_config(c->base_server->module_config,
3f4d7fdb598d64d80ab8656852276246f2f3b502rbb /* Get a single line of input from the client */
b931e2cf90d43b0894c2e2927a2a42aca46f277erpluem if (((rv = ap_get_brigade(c->input_filters, bb, AP_MODE_GETLINE,
3f4d7fdb598d64d80ab8656852276246f2f3b502rbb /* Make sure the data is flushed to the client */
ac00100e1ead618f1d91b77ba2d8a468782a23b7jorton /* Send back the data. */
e4afb803ff9a51f9ec7969f232b7fd4a4e94d5d4rbb "Run an echo server on this host"),
6e8fa9b44c6d5f5b3ac9dab52c4734259bcd8335coar ap_hook_process_connection(process_echo_connection, NULL, NULL,
f05787953018140838ad51456c86c965d6a86267jim create_echo_server_config, /* create per-server config structure */