- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,117 @@ |
1 |
+The http_client module - todo |
|
2 |
+====================== |
|
3 |
+- clean up |
|
4 |
+ Clean up curl connections, pconn and conn objects at exit time. Just to be nice. |
|
5 |
+ |
|
6 |
+- connection parameters |
|
7 |
+ read=line/all - Implemented in API, but not in parameter |
|
8 |
+ tlsverify=on/off |
|
9 |
+ failover=httpcon Other httpcon that can be used for failover in case of 5xx response or timeout |
|
10 |
+ not implemented |
|
11 |
+ |
|
12 |
+ |
|
13 |
+- Add XAVP parameter setting before running curl_connect |
|
14 |
+ |
|
15 |
+- save fingerprint of cert for trust-on-first-use procedure |
|
16 |
+ |
|
17 |
+- connection and last status for httpcon-object, needs to be object in process memory |
|
18 |
+ - done. |
|
19 |
+ - test what happens if we allocate curlcon objects in shared memory and use locks |
|
20 |
+ Code implemeneted in git master branch for testing |
|
21 |
+ - if 5xx response or timeout set flag |
|
22 |
+ - function in dialplan - httpcon_exists(object) |
|
23 |
+ - pv $curlstatus(object) ?? |
|
24 |
+ - this is per process !!! |
|
25 |
+ |
|
26 |
+- Figure out a way to communicate back the content-type of the response. Another pvar arg? |
|
27 |
+ - This is per process! |
|
28 |
+ |
|
29 |
+- Reload of configuration file from RPC interface |
|
30 |
+ - Need to close connections (if we have open ones according to idea above) |
|
31 |
+ - Need to rebuild core httpcon objects and "mirrors" in pkg memory |
|
32 |
+ - Should we just abandon old pkg objects and let them rot away |
|
33 |
+ in space and time? |
|
34 |
+ - Can we add a lock to the connection list while switching if we load a new |
|
35 |
+ list, then switch active list and then free the old ones |
|
36 |
+ |
|
37 |
+- rpc |
|
38 |
+ curl.listcon list all connection objects with properties |
|
39 |
+ -- Done, but not documented |
|
40 |
+ curl.modcon modify connection object |
|
41 |
+ url |
|
42 |
+ username |
|
43 |
+ password |
|
44 |
+ scheme |
|
45 |
+ timeout |
|
46 |
+ read |
|
47 |
+ tlsverify |
|
48 |
+ failover |
|
49 |
+ curl.addcon add connection object |
|
50 |
+ curl.rmcon remove connection object |
|
51 |
+ |
|
52 |
+ Maybe RPC commands to change default settings for proxys |
|
53 |
+ |
|
54 |
+- Async - event_route when done |
|
55 |
+ (with and without suspending transaction) |
|
56 |
+ Need background task process to run curl request |
|
57 |
+ event_route[curl:connectioncomplete] |
|
58 |
+ $curlcon == connection |
|
59 |
+ $curl == URL |
|
60 |
+ $curlres == result |
|
61 |
+ |
|
62 |
+ |
|
63 |
+- Option to try connections at module load with CURLOPT_CONNECT_ONLY |
|
64 |
+ just to make sure URLs resolve correctly in DNS and ports are open |
|
65 |
+ |
|
66 |
+- Make it possible to define modparams in any order. For now, httpcon definitions only use default |
|
67 |
+ values from modparam's defined on lines above in the config file. (issue #541) |
|
68 |
+ |
|
69 |
+- Option to configure DNS resolvers for CURL to use |
|
70 |
+ |
|
71 |
+ |
|
72 |
+Development API |
|
73 |
+--------------- |
|
74 |
+- xcap_client needs to add headers: |
|
75 |
+ char* hdr_name= NULL; |
|
76 |
+ |
|
77 |
+ memset(buf, 0, 128* sizeof(char)); |
|
78 |
+ match_header= buf; |
|
79 |
+ |
|
80 |
+ hdr_name= (match_type==IF_MATCH)?"If-Match":"If-None-Match"; |
|
81 |
+ |
|
82 |
+ len=sprintf(match_header, "%s: %s\n", hdr_name, match_etag); |
|
83 |
+ |
|
84 |
+ match_header[len]= '\0'; |
|
85 |
+ https://curl.haxx.se/libcurl/c/CURLOPT_HEADERFUNCTION.html |
|
86 |
+ |
|
87 |
+- It also does get a headers from the reply, which needs a callback |
|
88 |
+- auth_identify sets the CURLOPT_CAINFO option |
|
89 |
+ https://curl.haxx.se/libcurl/c/CURLOPT_CAINFO.html |
|
90 |
+ This can be set in the httpconf object |
|
91 |
+ |
|
92 |
+- Document that some options like useragent doesn't work in the |
|
93 |
+ old http_query function |
|
94 |
+ |
|
95 |
+ |
|
96 |
+Issues in the bug tracker |
|
97 |
+------------------------- |
|
98 |
+ |
|
99 |
+- none |
|
100 |
+ |
|
101 |
+ |
|
102 |
+Solved issues |
|
103 |
+-------------- |
|
104 |
+- https://github.com/kamailio/kamailio/issues/541 - closed |
|
105 |
+ Support setting proxy |
|
106 |
+ Comitted another patch, which included default and per-connection proxy |
|
107 |
+ settings. |
|
108 |
+- https://github.com/kamailio/kamailio/issues/515 - closed |
|
109 |
+ Support various auth methods - digest, basic etc |
|
110 |
+ Comitted another patch, which included default and per-connection settings |
|
111 |
+- https://github.com/kamailio/kamailio/pull/481 - closed |
|
112 |
+ Support TLS client certificates |
|
113 |
+- https://github.com/kamailio/kamailio/pull/435 - closed |
|
114 |
+ Pull request that fixed a lot of issues. |
|
115 |
+- https://github.com/kamailio/kamailio/issues/542 - closed |
|
116 |
+ Support connection reuse. Needs private memory structures to track connections |
|
117 |
+ |