src/modules/http_client/TODO.txt
de3afab1
 The http_client module - todo
9adec4ca
 ======================
329996b1
 - clean up			
   Clean up curl connections, pconn and conn objects at exit time. Just to be nice.
9adec4ca
 
 - connection parameters
9251a6f3
 	read=line/all		- Implemented in API, but not in parameter
9adec4ca
 	tlsverify=on/off
ff90dbd1
 	failover=httpcon	Other httpcon that can be used for failover in case of 5xx response or timeout
f947ee76
 				not implemented
9adec4ca
 
9251a6f3
 
 - Add XAVP parameter setting before running curl_connect
 
9adec4ca
 - save fingerprint of cert for trust-on-first-use procedure
 
329996b1
 - connection and last status for httpcon-object, needs to be object in process memory
 	- done.
c3c47887
 	- test what happens if we allocate curlcon objects in shared memory and use locks
f7caf81a
 		Code implemeneted in git master branch for testing
9adec4ca
 	- if 5xx response or timeout set flag
ff90dbd1
 	- function in dialplan - httpcon_exists(object)
9adec4ca
 	- pv $curlstatus(object) ??
de3afab1
 	- this is per process !!!
9adec4ca
 
9251a6f3
 - Figure out a way to communicate back the content-type of the response. Another pvar arg?
de3afab1
 	- This is per process!
9251a6f3
 
f947ee76
 - Reload of configuration file from RPC interface
 	- Need to close connections (if we have open ones according to idea above)
 	- Need to rebuild core httpcon objects and "mirrors" in pkg memory
329996b1
 		- Should we just abandon old pkg objects and let them rot away
 		  in space and time?
f947ee76
 	- Can we add a lock to the connection list while switching if we load a new
           list, then switch active list and then free the old ones
 
9adec4ca
 - rpc
 	curl.listcon	list all connection objects with properties
 			-- Done, but not documented
 	curl.modcon     modify connection object
 			url
 			username
 			password
 			scheme
 			timeout
 			read
 			tlsverify
 			failover
 	curl.addcon	add connection object
 	curl.rmcon	remove connection object
 
f947ee76
 	Maybe RPC commands to change default settings for proxys
9adec4ca
 
 - Async - event_route when done
1d28d1fd
 	(with and without suspending transaction)
9adec4ca
 	Need background task process to run curl request
 	event_route[curl:connectioncomplete]
 	$curlcon == connection
 	$curl == URL
 	$curlres == result
b8309bd5
 
c391c09f
 
 - Option to try connections at module load with CURLOPT_CONNECT_ONLY
   just to make sure URLs resolve correctly in DNS and ports are open
8c037d7c
 
 - Make it possible to define modparams in any order. For now, httpcon definitions only use default
   values from modparam's defined on lines above in the config file. (issue #541)
f947ee76
 
aa8da95f
 - Option to configure DNS resolvers for CURL to use
f947ee76
 
1d63275f
 
 Development API
 ---------------
 - xcap_client needs to add headers:
   char* hdr_name= NULL;
 
                 memset(buf, 0, 128* sizeof(char));
                 match_header= buf;
 
                 hdr_name= (match_type==IF_MATCH)?"If-Match":"If-None-Match";
 
                 len=sprintf(match_header, "%s: %s\n", hdr_name, match_etag);
 
                 match_header[len]= '\0';
   https://curl.haxx.se/libcurl/c/CURLOPT_HEADERFUNCTION.html
 
 - It also does get a headers from the reply, which needs a callback
 - auth_identify sets the CURLOPT_CAINFO option
   https://curl.haxx.se/libcurl/c/CURLOPT_CAINFO.html
   This can be set in the httpconf object
 
0fa4013b
 - Document that some options like useragent doesn't work in the
   old http_query function
1d63275f
 
 
f947ee76
 Issues in the bug tracker
 -------------------------
1d63275f
 
 - none
f947ee76
 
 
 Solved issues
 --------------
 - https://github.com/kamailio/kamailio/issues/541 - closed
   Support setting proxy 
   Comitted another patch, which included default and per-connection proxy
   settings. 
 - https://github.com/kamailio/kamailio/issues/515 - closed
   Support various auth methods - digest, basic etc
   Comitted another patch, which included default and per-connection settings
 - https://github.com/kamailio/kamailio/pull/481 - closed
   Support TLS client certificates
 - https://github.com/kamailio/kamailio/pull/435 - closed
   Pull request that fixed a lot of issues.
1d63275f
 - https://github.com/kamailio/kamailio/issues/542  - closed
   Support connection reuse. Needs private memory structures to track connections
f947ee76