diff options
author | Renato Botelho <renato@netgate.com> | 2017-01-04 14:08:43 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-01-04 14:08:43 -0200 |
commit | b628775dfd5979765962aefd18d054f15cd196ba (patch) | |
tree | e70666cd43ccbafcf38b4bf3f65e237319e6ff51 /src/etc/inc/dyndns.class | |
parent | c1510eda4df861a0c2583c9a55702c7cda5f0c6e (diff) | |
parent | 15dcf1320c08eb9339eda3e6fdf04599c51694b7 (diff) | |
download | pfsense-b628775dfd5979765962aefd18d054f15cd196ba.zip pfsense-b628775dfd5979765962aefd18d054f15cd196ba.tar.gz |
Merge pull request #3342 from PiBa-NL/dyndns.class_json_body
Diffstat (limited to 'src/etc/inc/dyndns.class')
-rw-r--r-- | src/etc/inc/dyndns.class | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class index 14f5c73..d0d27cf 100644 --- a/src/etc/inc/dyndns.class +++ b/src/etc/inc/dyndns.class @@ -361,8 +361,7 @@ curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); } - if ($this->_dnsService != 'ods' and $this->_dnsService != 'route53 ') { - curl_setopt($ch, CURLOPT_HEADER, 1); + if ($this->_dnsService != 'ods') { curl_setopt($ch, CURLOPT_USERAGENT, $this->_UserAgent); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_INTERFACE, 'if!' . $realparentif); @@ -777,7 +776,6 @@ $server = 'https://api.dnsimple.com/v1/domains/'; $token = $this->_dnsUser . ':' . $this->_dnsPass; $jsondata = '{"record":{"content":"' . $this->_dnsIP . '","ttl":"' . $this->_dnsTTL . '"}}'; - curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT"); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json', 'Content-Type: application/json', 'X-DNSimple-Token: ' . $token)); curl_setopt($ch, CURLOPT_URL, $server . $this->_dnsHost . '/records/' . $this->_dnsZoneID); @@ -824,6 +822,7 @@ break; } if ($this->_dnsService != 'ods') { + curl_setopt($ch, CURLOPT_HEADER, 1); $response = curl_exec($ch); $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); $header = substr($response, 0, $header_size); @@ -837,7 +836,7 @@ * Private Function (added 12 July 2005) [beta] * Retrieve Update Status */ - function _checkStatus($ch, $data) { + function _checkStatus($ch, $data, $header) { if ($this->_dnsVerboseLog) { log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): _checkStatus() starting.'), $this->_dnsService, $this->_FQDN)); } |