Kannel: Open Source WAP and SMS gateway  svn-r5285
http.h
Go to the documentation of this file.
1 /* ====================================================================
2  * The Kannel Software License, Version 1.0
3  *
4  * Copyright (c) 2001-2018 Kannel Group
5  * Copyright (c) 1998-2001 WapIT Ltd.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Kannel Group (http://www.kannel.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Kannel" and "Kannel Group" must not be used to
28  * endorse or promote products derived from this software without
29  * prior written permission. For written permission, please
30  * contact org@kannel.org.
31  *
32  * 5. Products derived from this software may not be called "Kannel",
33  * nor may "Kannel" appear in their name, without prior written
34  * permission of the Kannel Group.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE KANNEL GROUP OR ITS CONTRIBUTORS
40  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
41  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
42  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
43  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
44  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
45  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
46  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47  * ====================================================================
48  *
49  * This software consists of voluntary contributions made by many
50  * individuals on behalf of the Kannel Group. For more information on
51  * the Kannel Group, please see <http://www.kannel.org/>.
52  *
53  * Portions of this software are based upon software originally written at
54  * WapIT Ltd., Helsinki, Finland for the Kannel project.
55  */
56 
57 /*
58  * http.h - HTTP protocol implementation
59  *
60  * This header file defines the interface to the HTTP implementation
61  * in Kannel.
62  *
63  * We implement both the client and the server side of the protocol.
64  * We don't implement HTTP completely - only those parts that Kannel needs.
65  * You may or may not be able to use this code for other projects. It has
66  * not been a goal, but it might be possible, though you do need other
67  * parts of Kannel's gwlib as well.
68  *
69  * Initialization
70  * ==============
71  *
72  * The library MUST be initialized by a call to http_init. Failure to
73  * initialize means the library WILL NOT work. Note that the library
74  * can't initialize itself implicitly, because it cannot reliably
75  * create a mutex to protect the initialization. Therefore, it is the
76  * caller's responsibility to call http_init exactly once (no more, no
77  * less) at the beginning of the process, before any other thread makes
78  * any calls to the library.
79  *
80  * Client functionality
81  * ====================
82  *
83  * The library will invisibly keep the connections to HTTP servers open,
84  * so that it is possible to make several HTTP requests over a single
85  * TCP connection. This makes it much more efficient in high-load situations.
86  * On the other hand, if one request takes long, the library will still
87  * use several connections to the same server anyway.
88  *
89  * The library user can specify an HTTP proxy to be used. There can be only
90  * one proxy at a time, but it is possible to specify a list of hosts for
91  * which the proxy is not used. The proxy can be changed at run time.
92  *
93  * Server functionality
94  * ====================
95  *
96  * The library allows the implementation of an HTTP server by having
97  * functions to specify which ports should be open, and receiving requests
98  * from those ports.
99  *
100  * Header manipulation
101  * ===================
102  *
103  * The library additionally has some functions for manipulating lists of
104  * headers. These take a `List' (see gwlib/list.h) of Octstr's. The list
105  * represents a list of headers in an HTTP request or reply. The functions
106  * manipulate the list by adding and removing headers by name. It is a
107  * very bad idea to manipulate the list without using the header
108  * manipulation functions, however.
109  *
110  * Basic Authentication
111  * ====================
112  *
113  * Basic Authentication is the standard way for a client to authenticate
114  * itself to a server. It is done by adding an "Authorization" header
115  * to the request. The interface in this header therefore doesn't mention
116  * it, but the client and the server can do it by checking the headers
117  * using the generic functions provided.
118  *
119  * Acknowledgements
120  * ================
121  *
122  * Design: Lars Wirzenius, Richard Braakman
123  * Implementation: Lars Wirzenius
124  */
125 
126 
127 #ifndef HTTP_H
128 #define HTTP_H
129 
130 #include "gwlib/list.h"
131 #include "gwlib/octstr.h"
132 
133 
134 /*
135  * Well-known return values from HTTP servers. This is a complete
136  * list as defined by the W3C in RFC 2616, section 10.4.3.
137  */
138 
139 enum {
142  HTTP_OK = 200,
151  HTTP_FOUND = 302,
155  /* HTTP 306 is not used and reserved */
167  HTTP_GONE = 410,
181 };
182 
183 /*
184  * Groupings of the status codes listed above.
185  * See the http_status_class() function.
186  */
187 
188 enum {
195 };
196 
197 
198 /*
199  * Methods supported by this HTTP library. Currently not public but
200  * probably should be.
201  */
202 enum {
208 };
209 
210 /*
211  * A structure describing a CGI-BIN argument/variable.
212  */
213 typedef struct {
216 } HTTPCGIVar;
217 
218 
219 /*
220  * Initialization function. This MUST be called before any other function
221  * declared in this header file.
222  */
223 void http_init(void);
224 
225 
226 /*
227  * Shutdown function. This MUST be called when no other function
228  * declared in this header file will be called anymore.
229  */
230 void http_shutdown(void);
231 
232 
233 /***********************************************************************
234  * HTTP URL parsing.
235  */
236 
237 /*
238  * A structure describing a full URL with it's components.
239  */
240 typedef struct {
244  unsigned long port;
250 } HTTPURLParse;
251 
252 /*
253  * Create an URL parsing structure.
254  */
256 
257 /*
258  * Destroy an URL parsing structure.
259  */
261 
262 /*
263  * Parse the given URL and return a parsed struct containing all
264  * parsed components. If parsing failed, returns NULL.
265  */
267 
268 /*
269  * Dump the parsed struct to debug log level.
270  */
271 void parse_dump(HTTPURLParse *p);
272 
273 
274 /***********************************************************************
275  * HTTP proxy interface.
276  */
277 
278 
279 /*
280  * Functions for controlling proxy use. http_use_proxy sets the proxy to
281  * use; if another proxy was already in use, it is closed and forgotten
282  * about as soon as all existing requests via it have been served.
283  *
284  * http_close_proxy closes the current proxy connection, after any
285  * pending requests have been served.
286  */
287 void http_use_proxy(Octstr *hostname, int port, int ssl, List *exceptions,
288  Octstr *username, Octstr *password, Octstr *exceptions_regex);
289 void http_close_proxy(void);
290 
291 
292 /***********************************************************************
293  * HTTP client interface.
294  */
295 
296 /*
297  * Define interface from which all http requestes will be served
298  */
299 void http_set_interface(const Octstr *our_host);
300 
305 void http_set_client_timeout(long timeout);
306 
307 /*
308  * Functions for doing a GET request. The difference is that _real follows
309  * redirections, plain http_get does not. Return value is the status
310  * code of the request as a numeric value, or -1 if a response from the
311  * server was not received. If return value is not -1, reply_headers and
312  * reply_body are set and MUST be destroyed by caller.
313  *
314  * XXX these are going away in the future
315  */
316 int http_get_real(int method, Octstr *url, List *request_headers,
317  Octstr **final_url, List **reply_headers,
318  Octstr **reply_body);
319 
320 /*
321  * An identification for a caller of HTTP. This is used with
322  * http_start_request, and http_receive_result to route results to the right
323  * callers.
324  *
325  * Implementation note: We use a List as the type so that we can use
326  * that list for communicating the results. This makes it unnecessary
327  * to map the caller identifier to a List internally in the HTTP module.
328  */
329 typedef List HTTPCaller;
330 
331 
332 /*
333  * Create an HTTP caller identifier.
334  */
336 
337 
338 /*
339  * Destroy an HTTP caller identifier. Those that aren't destroyed
340  * explicitly are destroyed by http_shutdown.
341  */
343 
344 
345 /*
346  * Signal to a caller (presumably waiting in http_receive_result) that
347  * we're entering shutdown phase. This will make http_receive_result
348  * no longer block if the queue is empty.
349  */
351 
352 
353 /*
354  * Start an HTTP request. It will be completed in the background, and
355  * the result will eventually be received by http_receive_result.
356  * http_receive_result will return the id parameter passed to this function,
357  * and the caller can use this to keep track of which request and which
358  * response belong together. If id is NULL, it is changed to a non-null
359  * value (NULL replies from http_receive_result are reserved for cases
360  * when it doesn't return a reply).
361  *
362  * If `body' is NULL, it is a GET request, otherwise as POST request.
363  * If `follow' is true, HTTP redirections are followed, otherwise not.
364  *
365  * 'certkeyfile' defines a filename where openssl looks for a PEM-encoded
366  * certificate and a private key, if openssl is compiled in and an https
367  * URL is used. It can be NULL, in which case none is used and thus there
368  * is no ssl authentication, unless you have set a global one with
369  * use_global_certkey_file() from conn.c.
370  */
372  List *headers, Octstr *body, int follow, void *id,
373  Octstr *certkeyfile);
374 
375 
376 /*
377  * Get the result of a GET or a POST request. Returns either the id pointer
378  * (the one passed to http_start request if non-NULL) or NULL if
379  * http_caller_signal_shutdown has been called and there are no queued results.
380  */
381 void *http_receive_result_real(HTTPCaller *caller, int *status, Octstr **final_url,
382  List **headers, Octstr **body, int blocking);
383 
384 /* old compatibility mode, always blocking */
385 #define http_receive_result(caller, status, final_url, headers, body) \
386  http_receive_result_real(caller, status, final_url, headers, body, 1)
387 
388 /***********************************************************************
389  * HTTP server interface.
390  */
391 
392 
393 /*
394  * Data structure representing an HTTP client that has connected to
395  * the server we implement. It is used to route responses correctly.
396  */
397 typedef struct HTTPClient HTTPClient;
398 
399 
404 void http_set_server_timeout(int port, long timeout);
405 
406 /*
407  * Open an HTTP server at a given port. Return -1 for errors (invalid
408  * port number, etc), 0 for OK. This will also start a background thread
409  * to listen for connections to that port and read the requests from them.
410  * Second boolean variable indicates if the HTTP server should be started
411  * for SSL-enabled connections.
412  */
413 int http_open_port(int port, int ssl);
414 
415 
416 /*
417  * Same as above, but bind to a specific interface.
418  */
419 int http_open_port_if(int port, int ssl, Octstr *interface);
420 
421 
422 /*
423  * Accept a request from a client to the specified open port. Return NULL
424  * if the port is closed, otherwise a pointer to a client descriptor.
425  * Return the IP number (as a string) and other related information about
426  * the request via arguments if function return value is non-NULL. The
427  * caller is responsible for destroying the values returned via arguments,
428  * the caller descriptor is destroyed by http_send_reply.
429  *
430  * The requests are actually read by a background thread handled by the
431  * HTTP implementation, so it is not necessary by the HTTP user to have
432  * many threads to be fast. The HTTP user should use a single thread,
433  * unless requests can block.
434  */
435 HTTPClient *http_accept_request(int port, Octstr **client_ip,
436  Octstr **url, List **headers, Octstr **body,
437  List **cgivars);
438 
439 
440 /*
441  * Send a reply to a previously accepted request. The caller is responsible
442  * for destroying the headers and body after the call to http_send_reply
443  * finishes. This allows using them in several replies in an efficient way.
444  */
445 void http_send_reply(HTTPClient *client, int status, List *headers,
446  Octstr *body);
447 
448 
449 /*
450  * Don't send a reply to a previously accepted request, but only close
451  * the connection to the client. This can be used to reject requests from
452  * clients that are not authorized to access us.
453  */
455 
456 
457 /*
458  * Close a currently open port and stop corresponding background threads.
459  */
460 void http_close_port(int port);
461 
462 
463 /*
464  * Close all currently open ports and stop background threads.
465  */
466 void http_close_all_ports(void);
467 
468 
469 /*
470  * Destroy a list of HTTPCGIVar objects.
471  */
472 void http_destroy_cgiargs(List *args);
473 
474 
475 /*
476  * Return reference to CGI argument 'name', or NULL if not matching.
477  */
478 Octstr *http_cgi_variable(List *list, char *name);
479 
480 /*
481  * Return METHOD used by client
482  */
484 
485 /*
486  * Return URL used by client
487  */
489 
490 
491 /***********************************************************************
492  * HTTP header interface.
493  */
494 
495 
496 /*
497  * Functions for manipulating a list of headers. You can use a list of
498  * headers returned by one of the functions above, or create an empty
499  * list with http_create_empty_headers. Use http_destroy_headers to
500  * destroy a list of headers (not just the list, but the headers
501  * themselves). You can also use http_parse_header_string to create a list:
502  * it takes a textual representation of headers as an Octstr and returns
503  * the corresponding List. http_generate_header_string goes the other
504  * way.
505  *
506  * Once you have a list of headers, you can use http_header_add and the
507  * other functions to manipulate it.
508  */
510 void http_destroy_headers(List *headers);
511 void http_header_add(List *headers, char *name, char *contents);
512 void http_header_get(List *headers, long i, Octstr **name, Octstr **value);
513 List *http_header_duplicate(List *headers);
514 void http_header_pack(List *headers);
515 void http_append_headers(List *to, List *from);
516 Octstr *http_header_value(List *headers, Octstr *header);
517 
518 
519 /*
520  * Append all headers from new_headers to old_headers. Headers from
521  * new_headers _replace_ the ones in old_headers if they have the same
522  * name. For example, if you have:
523  * old_headers
524  * Accept: text/html
525  * Accept: text/plain
526  * Accept: image/jpeg
527  * Accept-Language: en
528  * new_headers
529  * Accept: text/html
530  * Accept: text/plain
531  * then after the operation, old_headers will have
532  * Accept-Language: en
533  * Accept: text/html
534  * Accept: text/plain
535  */
536 void http_header_combine(List *old_headers, List *new_headers);
537 
538 /*
539  * Return the length of the quoted-string (a HTTP field element)
540  * starting at position pos in the header. Return -1 if there
541  * is no quoted-string at that position.
542  */
543 long http_header_quoted_string_len(Octstr *header, long pos);
544 
545 
546 /*
547  * Take the value part of a header that has a format that allows
548  * multiple comma-separated elements, and split it into a list of
549  * those elements. Note that the function may have surprising
550  * results for values of headers that are not in this format.
551  */
553 
554 
555 /*
556  * The same as http_header_split_value, except that it splits
557  * headers containing 'credentials' or 'challenge' lists, which
558  * have a slightly different format. It also normalizes the list
559  * elements, so that parameters are introduced with ';'.
560  */
562 
563 
564 /*
565  * Remove all headers with name 'name' from the list. Return the
566  * number of headers removed.
567  */
568 long http_header_remove_all(List *headers, char *name);
569 
570 
571 /*
572  * Remove the hop-by-hop headers from a header list. These are the
573  * headers that describe a specific connection, not anything about
574  * the content. RFC2616 section 13.5.1 defines these.
575  */
576 void http_remove_hop_headers(List *headers);
577 
578 
579 /*
580  * Update the headers to reflect that a transformation has been
581  * applied to the entity body.
582  */
583 void http_header_mark_transformation(List *headers, Octstr *new_body,
584  Octstr *new_type);
585 
586 
587 /*
588  * Find the first header called `name' in `headers'. Returns its contents
589  * as a new Octet string, which the caller must free. Return NULL for
590  * not found.
591  */
592 Octstr *http_header_find_first_real(List *headers, char *name,
593  const char *file, long line, const char *func);
594 #define http_header_find_first(headers, name) \
595  gw_claim_area(http_header_find_first_real((headers), (name), __FILE__, __LINE__, __func__))
596 List *http_header_find_all(List *headers, char *name);
597 
598 
599 /*
600  * Find the Content-Type header and returns the type and charset.
601  */
602 void http_header_get_content_type(List *headers, Octstr **type,
603  Octstr **charset);
604 
605 
606 /*
607  * Check if a specific mime-type can be handled by a client. This is
608  * indicated via 'Accept' headers. Returns 1 if the mime-type is acceptable,
609  * otherwise 0.
610  */
611 int http_type_accepted(List *headers, char *type);
612 
613 
614 /*
615  * Dump the contents of a header list with debug.
616  */
617 void http_header_dump(List *headers);
618 
619 /*
620  * Ditto with cgi variables. Do not panic, when an empty are found from the
621  * list.
622  */
623 void http_cgivar_dump(List *cgiargs);
624 
625 /*
626  * As above function except that dump appended to Octstr.
627  */
628 void http_cgivar_dump_into(List *cgiargs, Octstr *os);
629 
630 /*
631  * Check if the passed charset is in the 'Accept-Charset' header list
632  * alues of the client. Returns 1 if the charset is acceptable, otherwise 0.
633  */
634 int http_charset_accepted(List *headers, char *charset);
635 
636 
637 /*
638  * Add Basic Authentication headers headers.
639  */
641 
642 
643 /*
644  * Many HTTP field elements can take parameters in a standardized
645  * form: parameters appear after the main value, each is introduced
646  * by a semicolon (;), and consists of a key=value pair or just
647  * a key, where the key is a token and the value is either a token
648  * or a quoted-string.
649  * The main value itself is a series of tokens, separators, and
650  * quoted-strings.
651  *
652  * This function will take such a field element, and look for the
653  * value of a specific key, which is then returned. If the key
654  * is not found within the header value NULL is returned.
655  *
656  * BEWARE: value is *only* the header value, not the whole header with
657  * field name.
658  *
659  * Example:
660  * * assume to have "Content-Type: application/xml; charset=UTF-8"
661  * * within List *headers
662  * value = http_header_value(headers, octstr_imm("Content-Type"))
663  * val = http_get_header_parameter(value, octstr_imm("charset"));
664  * will return "UTF-8" to lvalue.
665  */
667 
668 
669 /*
670  * Return the general class of a status code. For example, all
671  * 2xx codes are HTTP_STATUS_SUCCESSFUL. See the list at the top
672  * of this file.
673  */
674 int http_status_class(int code);
675 
676 
677 /*
678  * Return the HTTP_METHOD_xxx enum code for a Octstr containing
679  * the HTTP method name.
680  */
682 
683 
684 /*
685  * Return the char containing the HTTP method name.
686  */
687 char *http_method2name(int method);
688 
689 #endif
Octstr * http_request_url(HTTPClient *client)
Definition: http.c:2767
int http_open_port_if(int port, int ssl, Octstr *interface)
Definition: http.c:2482
Octstr * http_header_find_first_real(List *headers, char *name, const char *file, long line, const char *func)
Definition: http.c:3089
List * http_header_split_value(Octstr *value)
Definition: http.c:3316
int http_get_real(int method, Octstr *url, List *request_headers, Octstr **final_url, List **reply_headers, Octstr **reply_body)
Definition: http.c:1811
HTTPURLParse * http_urlparse_create(void)
Definition: http.c:1309
Definition: http.c:2004
Octstr * value
Definition: http.h:215
Octstr * pass
Definition: http.h:246
void http_cgivar_dump_into(List *cgiargs, Octstr *os)
Definition: http.c:3458
void http_start_request(HTTPCaller *caller, int method, Octstr *url, List *headers, Octstr *body, int follow, void *id, Octstr *certkeyfile)
Definition: http.c:1750
void http_header_get(List *headers, long i, Octstr **name, Octstr **value)
Definition: http.c:2901
void http_append_headers(List *to, List *from)
Definition: http.c:3051
int ssl
void http_close_proxy(void)
Definition: http.c:304
HTTPClient * http_accept_request(int port, Octstr **client_ip, Octstr **url, List **headers, Octstr **body, List **cgivars)
Definition: http.c:2570
static void client(int port)
Definition: test_udp.c:77
static HTTPCaller * caller
Definition: smsbox.c:429
List * http_header_find_all(List *headers, char *name)
Definition: http.c:3114
int code
Definition: smsc_cimd2.c:346
Octstr * fragment
Definition: http.h:249
Octstr * query
Definition: http.h:248
int type
Definition: smsc_cimd2.c:215
int http_status_class(int code)
Definition: http.c:3641
void http_header_add(List *headers, char *name, char *contents)
Definition: http.c:2885
int http_name2method(Octstr *method)
Definition: http.c:3653
void http_cgivar_dump(List *cgiargs)
Definition: http.c:3439
Octstr * http_get_header_parameter(Octstr *value, Octstr *parameter)
Definition: http.c:3530
void http_close_client(HTTPClient *client)
Definition: http.c:2757
long http_header_remove_all(List *headers, char *name)
Definition: http.c:3134
void http_header_combine(List *old_headers, List *new_headers)
Definition: http.c:3067
unsigned long port
Definition: http.h:244
Octstr * charset
Definition: test_ota.c:68
FILE * file
Definition: log.c:169
HTTPURLParse * parse_url(Octstr *url)
Definition: http.c:1373
int http_open_port(int port, int ssl)
Definition: http.c:2508
static Octstr * our_host
Definition: radius_acct.c:86
unsigned char * username
Definition: test_cimd2.c:99
void http_send_reply(HTTPClient *client, int status, List *headers, Octstr *body)
Definition: http.c:2694
int http_type_accepted(List *headers, char *type)
Definition: http.c:3502
Octstr * host
Definition: http.h:243
static Octstr * from
Definition: mtbatch.c:95
void http_set_client_timeout(long timeout)
Definition: http.c:1741
unsigned char * password
Definition: test_cimd2.c:100
Definition: http.h:142
void parse_dump(HTTPURLParse *p)
Definition: http.c:1344
Octstr * name
Definition: http.h:214
void http_destroy_cgiargs(List *args)
Definition: http.c:2817
void http_header_dump(List *headers)
Definition: http.c:3426
void http_header_pack(List *headers)
Definition: http.c:2991
HTTPCaller * http_caller_create(void)
Definition: http.c:897
void http_add_basic_auth(List *headers, Octstr *username, Octstr *password)
Definition: http.c:3514
Octstr * url
Definition: http.h:241
int http_method(HTTPClient *client)
Definition: http.c:2762
char * name
Definition: smsc_cimd2.c:212
void http_init(void)
Definition: http.c:3597
Octstr * http_header_value(List *headers, Octstr *header)
Definition: http.c:2931
Octstr * hostname
Definition: fakewap.c:232
static int method
Definition: test_http.c:76
List * http_create_empty_headers(void)
Definition: http.c:2871
long http_header_quoted_string_len(Octstr *header, long pos)
Definition: http.c:3292
void http_remove_hop_headers(List *headers)
Definition: http.c:3160
void http_set_interface(const Octstr *our_host)
Definition: http.c:1736
Octstr * path
Definition: http.h:247
void http_close_all_ports(void)
Definition: http.c:2525
int http_charset_accepted(List *headers, char *charset)
Definition: http.c:3508
Octstr * http_cgi_variable(List *list, char *name)
Definition: http.c:2835
void * http_receive_result_real(HTTPCaller *caller, int *status, Octstr **final_url, List **headers, Octstr **body, int blocking)
Definition: http.c:1776
Definition: octstr.c:118
void http_header_get_content_type(List *headers, Octstr **type, Octstr **charset)
Definition: http.c:3224
List * http_header_duplicate(List *headers)
Definition: http.c:2968
void http_close_port(int port)
Definition: http.c:2514
void http_use_proxy(Octstr *hostname, int port, int ssl, List *exceptions, Octstr *username, Octstr *password, Octstr *exceptions_regex)
Definition: http.c:268
void http_set_server_timeout(int port, long timeout)
Definition: http.c:2476
void http_caller_destroy(HTTPCaller *caller)
Definition: http.c:907
void http_shutdown(void)
Definition: http.c:3617
void http_header_mark_transformation(List *headers, Octstr *new_body, Octstr *new_type)
Definition: http.c:3202
Octstr * user
Definition: http.h:245
void http_destroy_headers(List *headers)
Definition: http.c:2878
void http_urlparse_destroy(HTTPURLParse *p)
Definition: http.c:1328
static Octstr * url
Definition: test_xmlrpc.c:84
Definition: list.c:102
char * http_method2name(int method)
Definition: http.c:3677
void http_caller_signal_shutdown(HTTPCaller *caller)
Definition: http.c:913
Octstr * scheme
Definition: http.h:242
List * http_header_split_auth_value(Octstr *value)
Definition: http.c:3350
List HTTPCaller
Definition: http.h:329
See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.