Project

General

Profile

Actions

Bug #9580

closed

Dynamic DNS DNSimple client errors

Added by Paul Sadauskas over 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Category:
Dynamic DNS
Target version:
Start date:
06/10/2019
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.4
Affected Architecture:

Description

It seems DNSimple recently updated their web server to use HTTP/2 for their API. The curl response handling code in the Dynamic DNS client uses a simple regex to look for ` 200 OK `, which no longer matches the success response from DNSimple.

DNSimple's API sends back a response like:

HTTP/2 200 \r\n
server: nginx
...

The response regex used to detect "success" for most clients in the DNSimple lib use this regex: /\s200\sOK/i

The php curl library has a function to extract the status code, it's probably safer to use that everywhere instead.

$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($code == "200") {
  // ...
}

Actions

Also available in: Atom PDF