06a82fec5c6ff9fd7e700c4c74aa00649522c4c6
1 /**
2 * collectd - src/write_http.c
3 * Copyright (C) 2009 Paul Sadauskas
4 * Copyright (C) 2009 Doug MacEachern
5 * Copyright (C) 2007-2014 Florian octo Forster
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; only version 2 of the License is applicable.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 *
20 * Authors:
21 * Florian octo Forster <octo at collectd.org>
22 * Doug MacEachern <dougm@hyperic.com>
23 * Paul Sadauskas <psadauskas@gmail.com>
24 **/
26 #include "collectd.h"
27 #include "plugin.h"
28 #include "common.h"
29 #include "utils_cache.h"
30 #include "utils_format_json.h"
32 #if HAVE_PTHREAD_H
33 # include <pthread.h>
34 #endif
36 #include <curl/curl.h>
38 #ifndef WRITE_HTTP_DEFAULT_BUFFER_SIZE
39 # define WRITE_HTTP_DEFAULT_BUFFER_SIZE 4096
40 #endif
42 /*
43 * Private variables
44 */
45 struct wh_callback_s
46 {
47 char *name;
49 char *location;
50 char *user;
51 char *pass;
52 char *credentials;
53 _Bool verify_peer;
54 _Bool verify_host;
55 char *cacert;
56 char *capath;
57 char *clientkey;
58 char *clientcert;
59 char *clientkeypass;
60 long sslversion;
61 _Bool store_rates;
62 int low_speed_limit;
63 time_t low_speed_time;
64 int timeout;
66 #define WH_FORMAT_COMMAND 0
67 #define WH_FORMAT_JSON 1
68 int format;
70 CURL *curl;
71 struct curl_slist *headers;
72 char curl_errbuf[CURL_ERROR_SIZE];
74 char *send_buffer;
75 size_t send_buffer_size;
76 size_t send_buffer_free;
77 size_t send_buffer_fill;
78 cdtime_t send_buffer_init_time;
80 pthread_mutex_t send_lock;
81 };
82 typedef struct wh_callback_s wh_callback_t;
84 static void wh_reset_buffer (wh_callback_t *cb) /* {{{ */
85 {
86 memset (cb->send_buffer, 0, cb->send_buffer_size);
87 cb->send_buffer_free = cb->send_buffer_size;
88 cb->send_buffer_fill = 0;
89 cb->send_buffer_init_time = cdtime ();
91 if (cb->format == WH_FORMAT_JSON)
92 {
93 format_json_initialize (cb->send_buffer,
94 &cb->send_buffer_fill,
95 &cb->send_buffer_free);
96 }
97 } /* }}} wh_reset_buffer */
99 static int wh_send_buffer (wh_callback_t *cb) /* {{{ */
100 {
101 int status = 0;
103 curl_easy_setopt (cb->curl, CURLOPT_POSTFIELDS, cb->send_buffer);
104 status = curl_easy_perform (cb->curl);
105 if (status != CURLE_OK)
106 {
107 ERROR ("write_http plugin: curl_easy_perform failed with "
108 "status %i: %s",
109 status, cb->curl_errbuf);
110 }
111 return (status);
112 } /* }}} wh_send_buffer */
114 static int wh_callback_init (wh_callback_t *cb) /* {{{ */
115 {
116 if (cb->curl != NULL)
117 return (0);
119 cb->curl = curl_easy_init ();
120 if (cb->curl == NULL)
121 {
122 ERROR ("curl plugin: curl_easy_init failed.");
123 return (-1);
124 }
126 if (cb->low_speed_limit > 0 && cb->low_speed_time > 0)
127 {
128 curl_easy_setopt (cb->curl, CURLOPT_LOW_SPEED_LIMIT,
129 (long) (cb->low_speed_limit * cb->low_speed_time));
130 curl_easy_setopt (cb->curl, CURLOPT_LOW_SPEED_TIME,
131 (long) cb->low_speed_time);
132 }
134 #ifdef HAVE_CURLOPT_TIMEOUT_MS
135 if (cb->timeout > 0)
136 curl_easy_setopt (cb->curl, CURLOPT_TIMEOUT_MS, (long) cb->timeout);
137 #endif
139 curl_easy_setopt (cb->curl, CURLOPT_NOSIGNAL, 1L);
140 curl_easy_setopt (cb->curl, CURLOPT_USERAGENT, COLLECTD_USERAGENT);
142 cb->headers = NULL;
143 cb->headers = curl_slist_append (cb->headers, "Accept: */*");
144 if (cb->format == WH_FORMAT_JSON)
145 cb->headers = curl_slist_append (cb->headers, "Content-Type: application/json");
146 else
147 cb->headers = curl_slist_append (cb->headers, "Content-Type: text/plain");
148 cb->headers = curl_slist_append (cb->headers, "Expect:");
149 curl_easy_setopt (cb->curl, CURLOPT_HTTPHEADER, cb->headers);
151 curl_easy_setopt (cb->curl, CURLOPT_ERRORBUFFER, cb->curl_errbuf);
152 curl_easy_setopt (cb->curl, CURLOPT_URL, cb->location);
153 curl_easy_setopt (cb->curl, CURLOPT_FOLLOWLOCATION, 1L);
154 curl_easy_setopt (cb->curl, CURLOPT_MAXREDIRS, 50L);
156 if (cb->user != NULL)
157 {
158 #ifdef HAVE_CURLOPT_USERNAME
159 curl_easy_setopt (cb->curl, CURLOPT_USERNAME, cb->user);
160 curl_easy_setopt (cb->curl, CURLOPT_PASSWORD,
161 (cb->pass == NULL) ? "" : cb->pass);
162 #else
163 size_t credentials_size;
165 credentials_size = strlen (cb->user) + 2;
166 if (cb->pass != NULL)
167 credentials_size += strlen (cb->pass);
169 cb->credentials = (char *) malloc (credentials_size);
170 if (cb->credentials == NULL)
171 {
172 ERROR ("curl plugin: malloc failed.");
173 return (-1);
174 }
176 ssnprintf (cb->credentials, credentials_size, "%s:%s",
177 cb->user, (cb->pass == NULL) ? "" : cb->pass);
178 curl_easy_setopt (cb->curl, CURLOPT_USERPWD, cb->credentials);
179 #endif
180 curl_easy_setopt (cb->curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
181 }
183 curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYPEER, (long) cb->verify_peer);
184 curl_easy_setopt (cb->curl, CURLOPT_SSL_VERIFYHOST,
185 cb->verify_host ? 2L : 0L);
186 curl_easy_setopt (cb->curl, CURLOPT_SSLVERSION, cb->sslversion);
187 if (cb->cacert != NULL)
188 curl_easy_setopt (cb->curl, CURLOPT_CAINFO, cb->cacert);
189 if (cb->capath != NULL)
190 curl_easy_setopt (cb->curl, CURLOPT_CAPATH, cb->capath);
192 if (cb->clientkey != NULL && cb->clientcert != NULL)
193 {
194 curl_easy_setopt (cb->curl, CURLOPT_SSLKEY, cb->clientkey);
195 curl_easy_setopt (cb->curl, CURLOPT_SSLCERT, cb->clientcert);
197 if (cb->clientkeypass != NULL)
198 curl_easy_setopt (cb->curl, CURLOPT_SSLKEYPASSWD, cb->clientkeypass);
199 }
201 wh_reset_buffer (cb);
203 return (0);
204 } /* }}} int wh_callback_init */
206 static int wh_flush_nolock (cdtime_t timeout, wh_callback_t *cb) /* {{{ */
207 {
208 int status;
210 DEBUG ("write_http plugin: wh_flush_nolock: timeout = %.3f; "
211 "send_buffer_fill = %zu;",
212 CDTIME_T_TO_DOUBLE (timeout),
213 cb->send_buffer_fill);
215 /* timeout == 0 => flush unconditionally */
216 if (timeout > 0)
217 {
218 cdtime_t now;
220 now = cdtime ();
221 if ((cb->send_buffer_init_time + timeout) > now)
222 return (0);
223 }
225 if (cb->format == WH_FORMAT_COMMAND)
226 {
227 if (cb->send_buffer_fill <= 0)
228 {
229 cb->send_buffer_init_time = cdtime ();
230 return (0);
231 }
233 status = wh_send_buffer (cb);
234 wh_reset_buffer (cb);
235 }
236 else if (cb->format == WH_FORMAT_JSON)
237 {
238 if (cb->send_buffer_fill <= 2)
239 {
240 cb->send_buffer_init_time = cdtime ();
241 return (0);
242 }
244 status = format_json_finalize (cb->send_buffer,
245 &cb->send_buffer_fill,
246 &cb->send_buffer_free);
247 if (status != 0)
248 {
249 ERROR ("write_http: wh_flush_nolock: "
250 "format_json_finalize failed.");
251 wh_reset_buffer (cb);
252 return (status);
253 }
255 status = wh_send_buffer (cb);
256 wh_reset_buffer (cb);
257 }
258 else
259 {
260 ERROR ("write_http: wh_flush_nolock: "
261 "Unknown format: %i",
262 cb->format);
263 return (-1);
264 }
266 return (status);
267 } /* }}} wh_flush_nolock */
269 static int wh_flush (cdtime_t timeout, /* {{{ */
270 const char *identifier __attribute__((unused)),
271 user_data_t *user_data)
272 {
273 wh_callback_t *cb;
274 int status;
276 if (user_data == NULL)
277 return (-EINVAL);
279 cb = user_data->data;
281 pthread_mutex_lock (&cb->send_lock);
283 if (cb->curl == NULL)
284 {
285 status = wh_callback_init (cb);
286 if (status != 0)
287 {
288 ERROR ("write_http plugin: wh_callback_init failed.");
289 pthread_mutex_unlock (&cb->send_lock);
290 return (-1);
291 }
292 }
294 status = wh_flush_nolock (timeout, cb);
295 pthread_mutex_unlock (&cb->send_lock);
297 return (status);
298 } /* }}} int wh_flush */
300 static void wh_callback_free (void *data) /* {{{ */
301 {
302 wh_callback_t *cb;
304 if (data == NULL)
305 return;
307 cb = data;
309 wh_flush_nolock (/* timeout = */ 0, cb);
311 if (cb->curl != NULL)
312 {
313 curl_easy_cleanup (cb->curl);
314 cb->curl = NULL;
315 }
317 if (cb->headers != NULL)
318 {
319 curl_slist_free_all (cb->headers);
320 cb->headers = NULL;
321 }
323 sfree (cb->name);
324 sfree (cb->location);
325 sfree (cb->user);
326 sfree (cb->pass);
327 sfree (cb->credentials);
328 sfree (cb->cacert);
329 sfree (cb->capath);
330 sfree (cb->clientkey);
331 sfree (cb->clientcert);
332 sfree (cb->clientkeypass);
333 sfree (cb->send_buffer);
335 sfree (cb);
336 } /* }}} void wh_callback_free */
338 static int wh_write_command (const data_set_t *ds, const value_list_t *vl, /* {{{ */
339 wh_callback_t *cb)
340 {
341 char key[10*DATA_MAX_NAME_LEN];
342 char values[512];
343 char command[1024];
344 size_t command_len;
346 int status;
348 if (0 != strcmp (ds->type, vl->type)) {
349 ERROR ("write_http plugin: DS type does not match "
350 "value list type");
351 return -1;
352 }
354 /* Copy the identifier to `key' and escape it. */
355 status = FORMAT_VL (key, sizeof (key), vl);
356 if (status != 0) {
357 ERROR ("write_http plugin: error with format_name");
358 return (status);
359 }
360 escape_string (key, sizeof (key));
362 /* Convert the values to an ASCII representation and put that into
363 * `values'. */
364 status = format_values (values, sizeof (values), ds, vl, cb->store_rates);
365 if (status != 0) {
366 ERROR ("write_http plugin: error with "
367 "wh_value_list_to_string");
368 return (status);
369 }
371 command_len = (size_t) ssnprintf (command, sizeof (command),
372 "PUTVAL %s interval=%.3f %s\r\n",
373 key,
374 CDTIME_T_TO_DOUBLE (vl->interval),
375 values);
376 if (command_len >= sizeof (command)) {
377 ERROR ("write_http plugin: Command buffer too small: "
378 "Need %zu bytes.", command_len + 1);
379 return (-1);
380 }
382 pthread_mutex_lock (&cb->send_lock);
384 if (cb->curl == NULL)
385 {
386 status = wh_callback_init (cb);
387 if (status != 0)
388 {
389 ERROR ("write_http plugin: wh_callback_init failed.");
390 pthread_mutex_unlock (&cb->send_lock);
391 return (-1);
392 }
393 }
395 if (command_len >= cb->send_buffer_free)
396 {
397 status = wh_flush_nolock (/* timeout = */ 0, cb);
398 if (status != 0)
399 {
400 pthread_mutex_unlock (&cb->send_lock);
401 return (status);
402 }
403 }
404 assert (command_len < cb->send_buffer_free);
406 /* `command_len + 1' because `command_len' does not include the
407 * trailing null byte. Neither does `send_buffer_fill'. */
408 memcpy (cb->send_buffer + cb->send_buffer_fill,
409 command, command_len + 1);
410 cb->send_buffer_fill += command_len;
411 cb->send_buffer_free -= command_len;
413 DEBUG ("write_http plugin: <%s> buffer %zu/%zu (%g%%) \"%s\"",
414 cb->location,
415 cb->send_buffer_fill, cb->send_buffer_size,
416 100.0 * ((double) cb->send_buffer_fill) / ((double) cb->send_buffer_size),
417 command);
419 /* Check if we have enough space for this command. */
420 pthread_mutex_unlock (&cb->send_lock);
422 return (0);
423 } /* }}} int wh_write_command */
425 static int wh_write_json (const data_set_t *ds, const value_list_t *vl, /* {{{ */
426 wh_callback_t *cb)
427 {
428 int status;
430 pthread_mutex_lock (&cb->send_lock);
432 if (cb->curl == NULL)
433 {
434 status = wh_callback_init (cb);
435 if (status != 0)
436 {
437 ERROR ("write_http plugin: wh_callback_init failed.");
438 pthread_mutex_unlock (&cb->send_lock);
439 return (-1);
440 }
441 }
443 status = format_json_value_list (cb->send_buffer,
444 &cb->send_buffer_fill,
445 &cb->send_buffer_free,
446 ds, vl, cb->store_rates);
447 if (status == (-ENOMEM))
448 {
449 status = wh_flush_nolock (/* timeout = */ 0, cb);
450 if (status != 0)
451 {
452 wh_reset_buffer (cb);
453 pthread_mutex_unlock (&cb->send_lock);
454 return (status);
455 }
457 status = format_json_value_list (cb->send_buffer,
458 &cb->send_buffer_fill,
459 &cb->send_buffer_free,
460 ds, vl, cb->store_rates);
461 }
462 if (status != 0)
463 {
464 pthread_mutex_unlock (&cb->send_lock);
465 return (status);
466 }
468 DEBUG ("write_http plugin: <%s> buffer %zu/%zu (%g%%)",
469 cb->location,
470 cb->send_buffer_fill, cb->send_buffer_size,
471 100.0 * ((double) cb->send_buffer_fill) / ((double) cb->send_buffer_size));
473 /* Check if we have enough space for this command. */
474 pthread_mutex_unlock (&cb->send_lock);
476 return (0);
477 } /* }}} int wh_write_json */
479 static int wh_write (const data_set_t *ds, const value_list_t *vl, /* {{{ */
480 user_data_t *user_data)
481 {
482 wh_callback_t *cb;
483 int status;
485 if (user_data == NULL)
486 return (-EINVAL);
488 cb = user_data->data;
490 if (cb->format == WH_FORMAT_JSON)
491 status = wh_write_json (ds, vl, cb);
492 else
493 status = wh_write_command (ds, vl, cb);
495 return (status);
496 } /* }}} int wh_write */
498 static int config_set_format (wh_callback_t *cb, /* {{{ */
499 oconfig_item_t *ci)
500 {
501 char *string;
503 if ((ci->values_num != 1)
504 || (ci->values[0].type != OCONFIG_TYPE_STRING))
505 {
506 WARNING ("write_http plugin: The `%s' config option "
507 "needs exactly one string argument.", ci->key);
508 return (-1);
509 }
511 string = ci->values[0].value.string;
512 if (strcasecmp ("Command", string) == 0)
513 cb->format = WH_FORMAT_COMMAND;
514 else if (strcasecmp ("JSON", string) == 0)
515 cb->format = WH_FORMAT_JSON;
516 else
517 {
518 ERROR ("write_http plugin: Invalid format string: %s",
519 string);
520 return (-1);
521 }
523 return (0);
524 } /* }}} int config_set_format */
526 static int wh_config_node (oconfig_item_t *ci) /* {{{ */
527 {
528 wh_callback_t *cb;
529 int buffer_size = 0;
530 user_data_t user_data;
531 char callback_name[DATA_MAX_NAME_LEN];
532 int i;
534 cb = malloc (sizeof (*cb));
535 if (cb == NULL)
536 {
537 ERROR ("write_http plugin: malloc failed.");
538 return (-1);
539 }
540 memset (cb, 0, sizeof (*cb));
541 cb->verify_peer = 1;
542 cb->verify_host = 1;
543 cb->format = WH_FORMAT_COMMAND;
544 <<<<<<< HEAD
545 cb->sslversion = CURL_SSLVERSION_DEFAULT;
546 cb->low_speed_limit = 0;
547 cb->timeout = 0;
548 =======
549 cb->curl = NULL;
550 cb->headers = NULL;
551 >>>>>>> collectd-5.4
553 pthread_mutex_init (&cb->send_lock, /* attr = */ NULL);
555 cf_util_get_string (ci, &cb->name);
557 /* FIXME: Remove this legacy mode in version 6. */
558 if (strcasecmp ("URL", ci->key) == 0)
559 cf_util_get_string (ci, &cb->location);
561 for (i = 0; i < ci->children_num; i++)
562 {
563 oconfig_item_t *child = ci->children + i;
565 if (strcasecmp ("URL", child->key) == 0)
566 cf_util_get_string (child, &cb->location);
567 else if (strcasecmp ("User", child->key) == 0)
568 cf_util_get_string (child, &cb->user);
569 else if (strcasecmp ("Password", child->key) == 0)
570 cf_util_get_string (child, &cb->pass);
571 else if (strcasecmp ("VerifyPeer", child->key) == 0)
572 cf_util_get_boolean (child, &cb->verify_peer);
573 else if (strcasecmp ("VerifyHost", child->key) == 0)
574 cf_util_get_boolean (child, &cb->verify_host);
575 else if (strcasecmp ("CACert", child->key) == 0)
576 cf_util_get_string (child, &cb->cacert);
577 else if (strcasecmp ("CAPath", child->key) == 0)
578 cf_util_get_string (child, &cb->capath);
579 else if (strcasecmp ("ClientKey", child->key) == 0)
580 cf_util_get_string (child, &cb->clientkey);
581 else if (strcasecmp ("ClientCert", child->key) == 0)
582 cf_util_get_string (child, &cb->clientcert);
583 else if (strcasecmp ("ClientKeyPass", child->key) == 0)
584 cf_util_get_string (child, &cb->clientkeypass);
585 else if (strcasecmp ("SSLVersion", child->key) == 0)
586 {
587 char *value = NULL;
589 cf_util_get_string (child, &value);
591 if (value == NULL || strcasecmp ("default", value) == 0)
592 cb->sslversion = CURL_SSLVERSION_DEFAULT;
593 else if (strcasecmp ("SSLv2", value) == 0)
594 cb->sslversion = CURL_SSLVERSION_SSLv2;
595 else if (strcasecmp ("SSLv3", value) == 0)
596 cb->sslversion = CURL_SSLVERSION_SSLv3;
597 else if (strcasecmp ("TLSv1", value) == 0)
598 cb->sslversion = CURL_SSLVERSION_TLSv1;
599 #if (LIBCURL_VERSION_MAJOR > 7) || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 34)
600 else if (strcasecmp ("TLSv1_0", value) == 0)
601 cb->sslversion = CURL_SSLVERSION_TLSv1_0;
602 else if (strcasecmp ("TLSv1_1", value) == 0)
603 cb->sslversion = CURL_SSLVERSION_TLSv1_1;
604 else if (strcasecmp ("TLSv1_2", value) == 0)
605 cb->sslversion = CURL_SSLVERSION_TLSv1_2;
606 #endif
607 else
608 ERROR ("write_http plugin: Invalid SSLVersion "
609 "option: %s.", value);
611 sfree(value);
612 }
613 else if (strcasecmp ("Format", child->key) == 0)
614 config_set_format (cb, child);
615 else if (strcasecmp ("StoreRates", child->key) == 0)
616 cf_util_get_boolean (child, &cb->store_rates);
617 else if (strcasecmp ("BufferSize", child->key) == 0)
618 cf_util_get_int (child, &buffer_size);
619 else if (strcasecmp ("LowSpeedLimit", child->key) == 0)
620 cf_util_get_int (child, &cb->low_speed_limit);
621 else if (strcasecmp ("Timeout", child->key) == 0)
622 cf_util_get_int (child, &cb->timeout);
623 else
624 {
625 ERROR ("write_http plugin: Invalid configuration "
626 "option: %s.", child->key);
627 }
628 }
630 if (cb->location == NULL)
631 {
632 ERROR ("write_http plugin: no URL defined for instance '%s'",
633 cb->name);
634 wh_callback_free (cb);
635 return (-1);
636 }
638 if (cb->low_speed_limit > 0)
639 cb->low_speed_time = CDTIME_T_TO_TIME_T(plugin_get_interval());
641 /* Determine send_buffer_size. */
642 cb->send_buffer_size = WRITE_HTTP_DEFAULT_BUFFER_SIZE;
643 if (buffer_size >= 1024)
644 cb->send_buffer_size = (size_t) buffer_size;
645 else if (buffer_size != 0)
646 ERROR ("write_http plugin: Ignoring invalid BufferSize setting (%d).",
647 buffer_size);
649 /* Allocate the buffer. */
650 cb->send_buffer = malloc (cb->send_buffer_size);
651 if (cb->send_buffer == NULL)
652 {
653 ERROR ("write_http plugin: malloc(%zu) failed.", cb->send_buffer_size);
654 wh_callback_free (cb);
655 return (-1);
656 }
657 /* Nulls the buffer and sets ..._free and ..._fill. */
658 wh_reset_buffer (cb);
660 ssnprintf (callback_name, sizeof (callback_name), "write_http/%s",
661 cb->name);
662 DEBUG ("write_http: Registering write callback '%s' with URL '%s'",
663 callback_name, cb->location);
665 memset (&user_data, 0, sizeof (user_data));
666 user_data.data = cb;
667 user_data.free_func = NULL;
668 plugin_register_flush (callback_name, wh_flush, &user_data);
670 user_data.free_func = wh_callback_free;
671 plugin_register_write (callback_name, wh_write, &user_data);
673 return (0);
674 } /* }}} int wh_config_node */
676 static int wh_config (oconfig_item_t *ci) /* {{{ */
677 {
678 int i;
680 for (i = 0; i < ci->children_num; i++)
681 {
682 oconfig_item_t *child = ci->children + i;
684 if (strcasecmp ("Node", child->key) == 0)
685 wh_config_node (child);
686 /* FIXME: Remove this legacy mode in version 6. */
687 else if (strcasecmp ("URL", child->key) == 0) {
688 WARNING ("write_http plugin: Legacy <URL> block found. "
689 "Please use <Node> instead.");
690 wh_config_node (child);
691 }
692 else
693 {
694 ERROR ("write_http plugin: Invalid configuration "
695 "option: %s.", child->key);
696 }
697 }
699 return (0);
700 } /* }}} int wh_config */
702 static int wh_init (void) /* {{{ */
703 {
704 /* Call this while collectd is still single-threaded to avoid
705 * initialization issues in libgcrypt. */
706 curl_global_init (CURL_GLOBAL_SSL);
707 return (0);
708 } /* }}} int wh_init */
710 void module_register (void) /* {{{ */
711 {
712 plugin_register_complex_config ("write_http", wh_config);
713 plugin_register_init ("write_http", wh_init);
714 } /* }}} void module_register */
716 /* vim: set fdm=marker sw=8 ts=8 tw=78 et : */