Improve RDAP domain availability detection
Enhanced RDAP response handling to better detect domain availability by checking for 'free' and 'available' statuses in DebugController. WhoisService now normalizes 'free' status to 'AVAILABLE' for consistency in output.
This commit is contained in:
@@ -417,6 +417,14 @@ class WhoisService
|
||||
// Parse status
|
||||
if (isset($rdapData['status']) && is_array($rdapData['status'])) {
|
||||
$info['status'] = $rdapData['status'];
|
||||
|
||||
// Convert "free" status to "AVAILABLE" for consistency
|
||||
$info['status'] = array_map(function($status) {
|
||||
if (stripos($status, 'free') !== false) {
|
||||
return 'AVAILABLE';
|
||||
}
|
||||
return $status;
|
||||
}, $info['status']);
|
||||
}
|
||||
|
||||
// Parse entities (registrar, abuse contact)
|
||||
|
||||
Reference in New Issue
Block a user