Kannel: Open Source WAP and SMS gateway  svn-r5335
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 {
209 };
210 
211 /*
212  * A structure describing a CGI-BIN argument/variable.
213  */
214 typedef struct {
217 } HTTPCGIVar;
218 
219 
220 /*
221  * Initialization function. This MUST be called before any other function
222  * declared in this header file.
223  */
224 void http_init(void);
225 
226 
227 /*
228  * Shutdown function. This MUST be called when no other function
229  * declared in this header file will be called anymore.
230  */
231 void http_shutdown(void);
232 
233 
234 /***********************************************************************
235  * HTTP URL parsing.
236  */
237 
238 /*
239  * A structure describing a full URL with it's components.
240  */
241 typedef struct {
245  unsigned long port;
251 } HTTPURLParse;
252 
253 /*
254  * Create an URL parsing structure.
255  */
257 
258 /*
259  * Destroy an URL parsing structure.
260  */
262 
263 /*
264  * Parse the given URL and return a parsed struct containing all
265  * parsed components. If parsing failed, returns NULL.
266  */
268 
269 /*
270  * Dump the parsed struct to debug log level.
271  */
272 void parse_dump(HTTPURLParse *p);
273 
274 /*
275  * Parse CGI variables in <pairs> (query string in url or request body)
276  * Expected format: var1=value1&var2&var3=value3...
277  * Append HTTPCGIvar pointers to supplied list
278  */
279 void parse_cgivars(List *cgivars, Octstr *pairs);
280 
281 
282 
283 /***********************************************************************
284  * HTTP proxy interface.
285  */
286 
287 
288 /*
289  * Functions for controlling proxy use. http_use_proxy sets the proxy to
290  * use; if another proxy was already in use, it is closed and forgotten
291  * about as soon as all existing requests via it have been served.
292  *
293  * http_close_proxy closes the current proxy connection, after any
294  * pending requests have been served.
295  */
296 void http_use_proxy(Octstr *hostname, int port, int ssl, List *exceptions,
297  Octstr *username, Octstr *password, Octstr *exceptions_regex);
298 void http_close_proxy(void);
299 
300 
301 /***********************************************************************
302  * HTTP client interface.
303  */
304 
305 /*
306  * Define interface from which all http requestes will be served
307  */
308 void http_set_interface(const Octstr *our_host);
309 
314 void http_set_client_timeout(long timeout);
315 
316 /*
317  * Functions for doing a GET request. The difference is that _real follows
318  * redirections, plain http_get does not. Return value is the status
319  * code of the request as a numeric value, or -1 if a response from the
320  * server was not received. If return value is not -1, reply_headers and
321  * reply_body are set and MUST be destroyed by caller.
322  *
323  * XXX these are going away in the future
324  */
325 int http_get_real(int method, Octstr *url, List *request_headers,
326  Octstr **final_url, List **reply_headers,
327  Octstr **reply_body);
328 
329 /*
330  * An identification for a caller of HTTP. This is used with
331  * http_start_request, and http_receive_result to route results to the right
332  * callers.
333  *
334  * Implementation note: We use a List as the type so that we can use
335  * that list for communicating the results. This makes it unnecessary
336  * to map the caller identifier to a List internally in the HTTP module.
337  */
338 typedef List HTTPCaller;
339 
340 
341 /*
342  * Create an HTTP caller identifier.
343  */
345 
346 
347 /*
348  * Destroy an HTTP caller identifier. Those that aren't destroyed
349  * explicitly are destroyed by http_shutdown.
350  */
352 
353 
354 /*
355  * Signal to a caller (presumably waiting in http_receive_result) that
356  * we're entering shutdown phase. This will make http_receive_result
357  * no longer block if the queue is empty.
358  */
360 
361 
362 /*
363  * Start an HTTP request. It will be completed in the background, and
364  * the result will eventually be received by http_receive_result.
365  * http_receive_result will return the id parameter passed to this function,
366  * and the caller can use this to keep track of which request and which
367  * response belong together. If id is NULL, it is changed to a non-null
368  * value (NULL replies from http_receive_result are reserved for cases
369  * when it doesn't return a reply).
370  *
371  * If `body' is NULL, it is a GET request, otherwise as POST request.
372  * If `follow' is true, HTTP redirections are followed, otherwise not.
373  *
374  * 'certkeyfile' defines a filename where openssl looks for a PEM-encoded
375  * certificate and a private key, if openssl is compiled in and an https
376  * URL is used. It can be NULL, in which case none is used and thus there
377  * is no ssl authentication, unless you have set a global one with
378  * use_global_certkey_file() from conn.c.
379  */
381  List *headers, Octstr *body, int follow, void *id,
382  Octstr *certkeyfile);
383 
384 
385 /*
386  * Get the result of a GET or a POST request. Returns either the id pointer
387  * (the one passed to http_start request if non-NULL) or NULL if
388  * http_caller_signal_shutdown has been called and there are no queued results.
389  */
390 void *http_receive_result_real(HTTPCaller *caller, int *status, Octstr **final_url,
391  List **headers, Octstr **body, int blocking);
392 
393 /* old compatibility mode, always blocking */
394 #define http_receive_result(caller, status, final_url, headers, body) \
395  http_receive_result_real(caller, status, final_url, headers, body, 1)
396 
397 /***********************************************************************
398  * HTTP server interface.
399  */
400 
401 
402 /*
403  * Data structure representing an HTTP client that has connected to
404  * the server we implement. It is used to route responses correctly.
405  */
406 typedef struct HTTPClient HTTPClient;
407 
408 
413 void http_set_server_timeout(int port, long timeout);
414 
415 /*
416  * Open an HTTP server at a given port. Return -1 for errors (invalid
417  * port number, etc), 0 for OK. This will also start a background thread
418  * to listen for connections to that port and read the requests from them.
419  * Second boolean variable indicates if the HTTP server should be started
420  * for SSL-enabled connections.
421  */
422 int http_open_port(int port, int ssl);
423 
424 
425 /*
426  * Same as above, but bind to a specific interface.
427  */
428 int http_open_port_if(int port, int ssl, Octstr *interface);
429 
430 
431 /*
432  * Accept a request from a client to the specified open port. Return NULL
433  * if the port is closed, otherwise a pointer to a client descriptor.
434  * Return the IP number (as a string) and other related information about
435  * the request via arguments if function return value is non-NULL. The
436  * caller is responsible for destroying the values returned via arguments,
437  * the caller descriptor is destroyed by http_send_reply.
438  *
439  * The requests are actually read by a background thread handled by the
440  * HTTP implementation, so it is not necessary by the HTTP user to have
441  * many threads to be fast. The HTTP user should use a single thread,
442  * unless requests can block.
443  */
444 HTTPClient *http_accept_request(int port, Octstr **client_ip,
445  Octstr **url, List **headers, Octstr **body,
446  List **cgivars);
447 
448 
449 /*
450  * Send a reply to a previously accepted request. The caller is responsible
451  * for destroying the headers and body after the call to http_send_reply
452  * finishes. This allows using them in several replies in an efficient way.
453  */
454 void http_send_reply(HTTPClient *client, int status, List *headers,
455  Octstr *body);
456 
457 
458 /*
459  * Don't send a reply to a previously accepted request, but only close
460  * the connection to the client. This can be used to reject requests from
461  * clients that are not authorized to access us.
462  */
464 
465 
466 /*
467  * Close a currently open port and stop corresponding background threads.
468  */
469 void http_close_port(int port);
470 
471 
472 /*
473  * Close all currently open ports and stop background threads.
474  */
475 void http_close_all_ports(void);
476 
477 
478 /*
479  * Destroy a list of HTTPCGIVar objects.
480  */
481 void http_destroy_cgiargs(List *args);
482 
483 
484 /*
485  * Return reference to CGI argument 'name', or NULL if not matching.
486  */
487 Octstr *http_cgi_variable(List *list, char *name);
488 
489 /*
490  * Return METHOD used by client
491  */
493 
494 /*
495  * Return URL used by client
496  */
498 
499 
500 /***********************************************************************
501  * HTTP header interface.
502  */
503 
504 
505 /*
506  * Functions for manipulating a list of headers. You can use a list of
507  * headers returned by one of the functions above, or create an empty
508  * list with http_create_empty_headers. Use http_destroy_headers to
509  * destroy a list of headers (not just the list, but the headers
510  * themselves). You can also use http_parse_header_string to create a list:
511  * it takes a textual representation of headers as an Octstr and returns
512  * the corresponding List. http_generate_header_string goes the other
513  * way.
514  *
515  * Once you have a list of headers, you can use http_header_add and the
516  * other functions to manipulate it.
517  */
519 void http_destroy_headers(List *headers);
520 void http_header_add(List *headers, char *name, char *contents);
521 void http_header_get(List *headers, long i, Octstr **name, Octstr **value);
522 List *http_header_duplicate(List *headers);
523 void http_header_pack(List *headers);
524 void http_append_headers(List *to, List *from);
525 Octstr *http_header_value(List *headers, Octstr *header);
526 
527 
528 /*
529  * Append all headers from new_headers to old_headers. Headers from
530  * new_headers _replace_ the ones in old_headers if they have the same
531  * name. For example, if you have:
532  * old_headers
533  * Accept: text/html
534  * Accept: text/plain
535  * Accept: image/jpeg
536  * Accept-Language: en
537  * new_headers
538  * Accept: text/html
539  * Accept: text/plain
540  * then after the operation, old_headers will have
541  * Accept-Language: en
542  * Accept: text/html
543  * Accept: text/plain
544  */
545 void http_header_combine(List *old_headers, List *new_headers);
546 
547 /*
548  * Return the length of the quoted-string (a HTTP field element)
549  * starting at position pos in the header. Return -1 if there
550  * is no quoted-string at that position.
551  */
552 long http_header_quoted_string_len(Octstr *header, long pos);
553 
554 
555 /*
556  * Take the value part of a header that has a format that allows
557  * multiple comma-separated elements, and split it into a list of
558  * those elements. Note that the function may have surprising
559  * results for values of headers that are not in this format.
560  */
562 
563 
564 /*
565  * The same as http_header_split_value, except that it splits
566  * headers containing 'credentials' or 'challenge' lists, which
567  * have a slightly different format. It also normalizes the list
568  * elements, so that parameters are introduced with ';'.
569  */
571 
572 
573 /*
574  * Remove all headers with name 'name' from the list. Return the
575  * number of headers removed.
576  */
577 long http_header_remove_all(List *headers, char *name);
578 
579 
580 /*
581  * Remove the hop-by-hop headers from a header list. These are the
582  * headers that describe a specific connection, not anything about
583  * the content. RFC2616 section 13.5.1 defines these.
584  */
585 void http_remove_hop_headers(List *headers);
586 
587 
588 /*
589  * Update the headers to reflect that a transformation has been
590  * applied to the entity body.
591  */
592 void http_header_mark_transformation(List *headers, Octstr *new_body,
593  Octstr *new_type);
594 
595 
596 /*
597  * Find the first header called `name' in `headers'. Returns its contents
598  * as a new Octet string, which the caller must free. Return NULL for
599  * not found.
600  */
601 Octstr *http_header_find_first_real(List *headers, char *name,
602  const char *file, long line, const char *func);
603 #define http_header_find_first(headers, name) \
604  gw_claim_area(http_header_find_first_real((headers), (name), __FILE__, __LINE__, __func__))
605 List *http_header_find_all(List *headers, char *name);
606 
607 
608 /*
609  * Find the Content-Type header and returns the type and charset.
610  */
611 void http_header_get_content_type(List *headers, Octstr **type,
612  Octstr **charset);
613 
614 
615 /*
616  * Check if a specific mime-type can be handled by a client. This is
617  * indicated via 'Accept' headers. Returns 1 if the mime-type is acceptable,
618  * otherwise 0.
619  */
620 int http_type_accepted(List *headers, char *type);
621 
622 
623 /*
624  * Dump the contents of a header list with debug.
625  */
626 void http_header_dump(List *headers);
627 
628 /*
629  * Ditto with cgi variables. Do not panic, when an empty are found from the
630  * list.
631  */
632 void http_cgivar_dump(List *cgiargs);
633 
634 /*
635  * As above function except that dump appended to Octstr.
636  */
637 void http_cgivar_dump_into(List *cgiargs, Octstr *os);
638 
639 /*
640  * Check if the passed charset is in the 'Accept-Charset' header list
641  * alues of the client. Returns 1 if the charset is acceptable, otherwise 0.
642  */
643 int http_charset_accepted(List *headers, char *charset);
644 
645 
646 /*
647  * Add Basic Authentication headers headers.
648  */
650 
651 
652 /*
653  * Many HTTP field elements can take parameters in a standardized
654  * form: parameters appear after the main value, each is introduced
655  * by a semicolon (;), and consists of a key=value pair or just
656  * a key, where the key is a token and the value is either a token
657  * or a quoted-string.
658  * The main value itself is a series of tokens, separators, and
659  * quoted-strings.
660  *
661  * This function will take such a field element, and look for the
662  * value of a specific key, which is then returned. If the key
663  * is not found within the header value NULL is returned.
664  *
665  * BEWARE: value is *only* the header value, not the whole header with
666  * field name.
667  *
668  * Example:
669  * * assume to have "Content-Type: application/xml; charset=UTF-8"
670  * * within List *headers
671  * value = http_header_value(headers, octstr_imm("Content-Type"))
672  * val = http_get_header_parameter(value, octstr_imm("charset"));
673  * will return "UTF-8" to lvalue.
674  */
676 
677 
678 /*
679  * Return the general class of a status code. For example, all
680  * 2xx codes are HTTP_STATUS_SUCCESSFUL. See the list at the top
681  * of this file.
682  */
683 int http_status_class(int code);
684 
685 
686 /*
687  * Return the HTTP_METHOD_xxx enum code for a Octstr containing
688  * the HTTP method name.
689  */
691 
692 
693 /*
694  * Return the char containing the HTTP method name.
695  */
696 char *http_method2name(int method);
697 
698 #endif
Octstr * http_request_url(HTTPClient *client)
Definition: http.c:2768
int http_open_port_if(int port, int ssl, Octstr *interface)
Definition: http.c:2483
Octstr * http_header_find_first_real(List *headers, char *name, const char *file, long line, const char *func)
Definition: http.c:3090
List * http_header_split_value(Octstr *value)
Definition: http.c:3317
int http_get_real(int method, Octstr *url, List *request_headers, Octstr **final_url, List **reply_headers, Octstr **reply_body)
Definition: http.c:1821
HTTPURLParse * http_urlparse_create(void)
Definition: http.c:1313
Definition: http.c:2014
Octstr * value
Definition: http.h:216
Octstr * pass
Definition: http.h:247
void http_cgivar_dump_into(List *cgiargs, Octstr *os)
Definition: http.c:3459
void http_start_request(HTTPCaller *caller, int method, Octstr *url, List *headers, Octstr *body, int follow, void *id, Octstr *certkeyfile)
Definition: http.c:1760
void http_header_get(List *headers, long i, Octstr **name, Octstr **value)
Definition: http.c:2902
void http_append_headers(List *to, List *from)
Definition: http.c:3052
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:2571
static void client(int port)
Definition: test_udp.c:77
static HTTPCaller * caller
Definition: smsbox.c:442
List * http_header_find_all(List *headers, char *name)
Definition: http.c:3115
int code
Definition: smsc_cimd2.c:346
Octstr * fragment
Definition: http.h:250
Octstr * query
Definition: http.h:249
int type
Definition: smsc_cimd2.c:215
int http_status_class(int code)
Definition: http.c:3642
void http_header_add(List *headers, char *name, char *contents)
Definition: http.c:2886
int http_name2method(Octstr *method)
Definition: http.c:3654
void http_cgivar_dump(List *cgiargs)
Definition: http.c:3440
Octstr * http_get_header_parameter(Octstr *value, Octstr *parameter)
Definition: http.c:3531
void http_close_client(HTTPClient *client)
Definition: http.c:2758
long http_header_remove_all(List *headers, char *name)
Definition: http.c:3135
void http_header_combine(List *old_headers, List *new_headers)
Definition: http.c:3068
unsigned long port
Definition: http.h:245
Octstr * charset
Definition: test_ota.c:68
FILE * file
Definition: log.c:169
HTTPURLParse * parse_url(Octstr *url)
Definition: http.c:1377
int http_open_port(int port, int ssl)
Definition: http.c:2509
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:2695
int http_type_accepted(List *headers, char *type)
Definition: http.c:3503
Octstr * host
Definition: http.h:244
static Octstr * from
Definition: mtbatch.c:95
void http_set_client_timeout(long timeout)
Definition: http.c:1751
unsigned char * password
Definition: test_cimd2.c:100
Definition: http.h:142
void parse_dump(HTTPURLParse *p)
Definition: http.c:1348
Octstr * name
Definition: http.h:215
void http_destroy_cgiargs(List *args)
Definition: http.c:2818
void http_header_dump(List *headers)
Definition: http.c:3427
void http_header_pack(List *headers)
Definition: http.c:2992
HTTPCaller * http_caller_create(void)
Definition: http.c:897
void http_add_basic_auth(List *headers, Octstr *username, Octstr *password)
Definition: http.c:3515
Octstr * url
Definition: http.h:242
int http_method(HTTPClient *client)
Definition: http.c:2763
char * name
Definition: smsc_cimd2.c:212
void http_init(void)
Definition: http.c:3598
Octstr * http_header_value(List *headers, Octstr *header)
Definition: http.c:2932
Octstr * hostname
Definition: fakewap.c:232
static int method
Definition: test_http.c:76
List * http_create_empty_headers(void)
Definition: http.c:2872
long http_header_quoted_string_len(Octstr *header, long pos)
Definition: http.c:3293
void http_remove_hop_headers(List *headers)
Definition: http.c:3161
void http_set_interface(const Octstr *our_host)
Definition: http.c:1746
Octstr * path
Definition: http.h:248
void http_close_all_ports(void)
Definition: http.c:2526
int http_charset_accepted(List *headers, char *charset)
Definition: http.c:3509
Octstr * http_cgi_variable(List *list, char *name)
Definition: http.c:2836
void * http_receive_result_real(HTTPCaller *caller, int *status, Octstr **final_url, List **headers, Octstr **body, int blocking)
Definition: http.c:1786
Definition: octstr.c:118
void http_header_get_content_type(List *headers, Octstr **type, Octstr **charset)
Definition: http.c:3225
List * http_header_duplicate(List *headers)
Definition: http.c:2969
void http_close_port(int port)
Definition: http.c:2515
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:2477
void http_caller_destroy(HTTPCaller *caller)
Definition: http.c:907
void http_shutdown(void)
Definition: http.c:3618
void http_header_mark_transformation(List *headers, Octstr *new_body, Octstr *new_type)
Definition: http.c:3203
Octstr * user
Definition: http.h:246
void http_destroy_headers(List *headers)
Definition: http.c:2879
void http_urlparse_destroy(HTTPURLParse *p)
Definition: http.c:1332
static Octstr * url
Definition: test_xmlrpc.c:84
Definition: list.c:102
void parse_cgivars(List *cgivars, Octstr *pairs)
Definition: http.c:2542
char * http_method2name(int method)
Definition: http.c:3681
void http_caller_signal_shutdown(HTTPCaller *caller)
Definition: http.c:913
Octstr * scheme
Definition: http.h:243
List * http_header_split_auth_value(Octstr *value)
Definition: http.c:3351
List HTTPCaller
Definition: http.h:338
See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.