Module: kamailio
Branch: master
Commit: 8a6f57f59963e53bcf98dd39615db3980275d81b
URL: https://github.com/kamailio/kamailio/commit/8a6f57f59963e53bcf98dd39615db39…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2017-06-30T15:31:22+02:00
modules: readme files regenerated - http_client ... [skip ci]
---
Modified: src/modules/http_client/README
---
Diff: https://github.com/kamailio/kamailio/commit/8a6f57f59963e53bcf98dd39615db39…
Patch: https://github.com/kamailio/kamailio/commit/8a6f57f59963e53bcf98dd39615db39…
---
diff --git a/src/modules/http_client/README b/src/modules/http_client/README
index 7ee2d2f693..7f5718db5c 100644
--- a/src/modules/http_client/README
+++ b/src/modules/http_client/README
@@ -65,7 +65,7 @@ Hugh Waite
result)
4.2. http_get_redirect(connection, result)
- 4.3. http_client_query(url, [post-data], result)
+ 4.3. http_client_query(url, [post-data], [hdrs], result)
5. Pseudovariables
@@ -117,7 +117,7 @@ Hugh Waite
1.18. Short http_client config file
1.19. http_connect() usage
1.20. http_get_redirect() usage
- 1.21. curl_http_query() usage
+ 1.21. http_client_query() usage
Chapter 1. Admin Guide
@@ -153,7 +153,7 @@ Chapter 1. Admin Guide
4.1. http_connect(connection, url, [content_type, data,] result)
4.2. http_get_redirect(connection, result)
- 4.3. http_client_query(url, [post-data], result)
+ 4.3. http_client_query(url, [post-data], [hdrs], result)
5. Pseudovariables
@@ -609,7 +609,7 @@ http_follow_redirect = no
4.1. http_connect(connection, url, [content_type, data,] result)
4.2. http_get_redirect(connection, result)
- 4.3. http_client_query(url, [post-data], result)
+ 4.3. http_client_query(url, [post-data], [hdrs], result)
4.1. http_connect(connection, url, [content_type, data,] result)
@@ -667,7 +667,7 @@ modparam("http_client", "httpredirect", 1);
http_get_redirect("apiserver", "$var(targeturl)");
...
-4.3. http_client_query(url, [post-data], result)
+4.3. http_client_query(url, [post-data], [hdrs], result)
Sends HTTP GET or POST request according to URL given in “url”
parameter, which is a string that may contain pseudo variables.
@@ -675,6 +675,12 @@ http_get_redirect("apiserver", "$var(targeturl)");
If you want to make a POST-Request, you have to define the “post”-data,
that should be submitted in that request as the second parameter.
+ Custom headers may be specified via “hdrs” parameter (e.g.,
+ Content-Type).
+
+ Either of “post-data” or “hdrs” can be also set to empty string in
+ order to be ignored.
+
If HTTP server returns a class 2xx, 3xx or 4xx reply, the first line of
the reply's body (if any) is stored in “result” parameter, which must
be a writable pseudo variable.
@@ -689,25 +695,26 @@ http_get_redirect("apiserver", "$var(targeturl)");
utils module. It is changed to use the same base library and settings
as the rest of the functions in this module.
- Example 1.21. curl_http_query() usage
+ Example 1.21. http_client_query() usage
...
# GET-Request
http_client_query("http://api.com/index.php?r_uri=$(ru{s.escape.param})&f_uri=$(
fu{s.escape.param})",
"$var(result)");
-switch ($retcode) {
- ...
+switch ($rc) {
+ ...
}
...
-...
# POST-Request
-http_client_query("http://api.com/index.php", "r_uri=$(ru{s.escape.param})&f_uri
-=$(fu{s.escape.param})",
- "$var(result)");
-switch ($retcode) {
- ...
+http_client_query("http://api.com/index.php",
+ "r_uri=$(ru{s.escape.param})&f_uri=$(fu{s.escape.param})",
+ "$var(result)");
}
...
+# POST-Request
+http_client_query("http://api.com/index.php", "src=$si",
+ "Content-Type: text/plain", "$var(result)");
+...
5. Pseudovariables
Module: kamailio
Branch: master
Commit: 279e622b53b636d49b207907c8f3fe60ff9e2cd3
URL: https://github.com/kamailio/kamailio/commit/279e622b53b636d49b207907c8f3fe6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-06-30T15:17:46+02:00
http_client: updated docs for http_client_query()
---
Modified: src/modules/http_client/doc/http_client_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/279e622b53b636d49b207907c8f3fe6…
Patch: https://github.com/kamailio/kamailio/commit/279e622b53b636d49b207907c8f3fe6…
---
diff --git a/src/modules/http_client/doc/http_client_admin.xml b/src/modules/http_client/doc/http_client_admin.xml
index 799f47718a..9ea4f9ef3f 100644
--- a/src/modules/http_client/doc/http_client_admin.xml
+++ b/src/modules/http_client/doc/http_client_admin.xml
@@ -10,9 +10,9 @@
<!-- Module User's Guide -->
<chapter>
-
+
<title>&adminguide;</title>
-
+
<section>
<title>Overview</title>
<para>
@@ -31,7 +31,7 @@
<para>
The connections can either be defined with the "httpcon" module parameter
or in a separate configuration file, as specified by the "config_file" module
- parameter.
+ parameter.
</para>
<para>
Like in SIP, the HTTP URL may need encoding to be transported safely
@@ -711,21 +711,29 @@ http_get_redirect("apiserver", "$var(targeturl)");
</programlisting>
</example>
</section>
- <section id="http_client.f.curl_http_query">
+ <section id="http_client.f.http_query">
<title>
- <function moreinfo="none">http_client_query(url, [post-data], result)</function>
+ <function moreinfo="none">http_client_query(url, [post-data], [hdrs], result)</function>
</title>
<para>
Sends HTTP GET or POST request according to URL given in
<quote>url</quote> parameter, which is a string that may
contain pseudo variables.
- </para>
+ </para>
<para>
If you want to make a POST-Request, you have to define
the <quote>post</quote>-data, that should be submitted
in that request as the second parameter.
- </para>
- <para>
+ </para>
+ <para>
+ Custom headers may be specified via <quote>hdrs</quote> parameter
+ (e.g., Content-Type).
+ </para>
+ <para>
+ Either of <quote>post-data</quote> or <quote>hdrs</quote> can be
+ also set to empty string in order to be ignored.
+ </para>
+ <para>
If HTTP server returns a class 2xx, 3xx or 4xx reply,
the first line of the reply's body (if any) is
stored in <quote>result</quote> parameter,
@@ -734,7 +742,7 @@ http_get_redirect("apiserver", "$var(targeturl)");
<para>
Function returns reply code of HTTP reply or -1
if something went wrong.
- </para>
+ </para>
<para>
This function can be used from REQUEST_ROUTE,
ONREPLY_ROUTE, FAILURE_ROUTE, and BRANCH_ROUTE.
@@ -744,26 +752,26 @@ http_get_redirect("apiserver", "$var(targeturl)");
It is changed to use the same base library and settings as the rest of the functions in this module.
</para>
<example>
- <title><function>curl_http_query()</function> usage</title>
+ <title><function>http_client_query()</function> usage</title>
<programlisting format="linespecific">
...
# GET-Request
http_client_query("http://api.com/index.php?r_uri=$(ru{s.escape.param})&f_uri=$(fu{s.escap…",
"$var(result)");
-switch ($retcode) {
- ...
+switch ($rc) {
+ ...
}
...
- </programlisting>
- <programlisting format="linespecific">
-...
# POST-Request
-http_client_query("http://api.com/index.php", "r_uri=$(ru{s.escape.param})&f_uri=$(fu{s.escape.param})",
- "$var(result)");
-switch ($retcode) {
- ...
+http_client_query("http://api.com/index.php",
+ "r_uri=$(ru{s.escape.param})&f_uri=$(fu{s.escape.param})",
+ "$var(result)");
}
...
+# POST-Request
+http_client_query("http://api.com/index.php", "src=$si",
+ "Content-Type: text/plain", "$var(result)");
+...
</programlisting>
</example>
</section>
Module: kamailio
Branch: master
Commit: 4f587124998e665c5ab9df7fe14cfbb3a39a9ec8
URL: https://github.com/kamailio/kamailio/commit/4f587124998e665c5ab9df7fe14cfbb…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
Date: 2017-06-30T11:00:35+02:00
db_mysql Look for MariaDB as well as MySQL
---
Modified: src/modules/db_mysql/Makefile
---
Diff: https://github.com/kamailio/kamailio/commit/4f587124998e665c5ab9df7fe14cfbb…
Patch: https://github.com/kamailio/kamailio/commit/4f587124998e665c5ab9df7fe14cfbb…
---
diff --git a/src/modules/db_mysql/Makefile b/src/modules/db_mysql/Makefile
index fd09bfcce3..c8b48f985d 100644
--- a/src/modules/db_mysql/Makefile
+++ b/src/modules/db_mysql/Makefile
@@ -16,6 +16,10 @@ MYSQLCFG=$(shell which mysql_config)
ifeq ($(MYSQLCFG),)
MYSQLCFG=$(shell which mysql_config5)
endif
+# If no Mysql - do we have MariaDB?
+ifeq ($(MYSQLCFG),)
+MYSQLCFG=$(shell which mariadb_config)
+endif
endif
ifneq ($(MYSQLCFG),)