5
6
7
8
9
10
11
12
13
|
# File 'lib/dyndnsd/responder/dyndns_style.rb', line 5
def response_for_error(state)
return [405, {"Content-Type" => "text/plain"}, ["Method Not Allowed"]] if state == :method_forbidden
return [404, {"Content-Type" => "text/plain"}, ["Not Found"]] if state == :not_found
return [200, {"Content-Type" => "text/plain"}, ["notfqdn"]] if state == :hostname_missing
return [200, {"Content-Type" => "text/plain"}, ["nohost"]] if state == :host_forbidden
return [200, {"Content-Type" => "text/plain"}, ["notfqdn"]] if state == :hostname_malformed
end
|