mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-07-18 00:00:50 -04:00
Compare commits
2 Commits
ed7c56f12c
...
52e738b586
Author | SHA1 | Date | |
---|---|---|---|
|
52e738b586 | ||
|
c0afc295a5 |
@ -132,7 +132,7 @@ module HTTPX
|
|||||||
|
|
||||||
case code
|
case code
|
||||||
when :ok
|
when :ok
|
||||||
parse_addresses(result)
|
parse_addresses(result, request)
|
||||||
when :no_domain_found
|
when :no_domain_found
|
||||||
# Indicates no such domain was found.
|
# Indicates no such domain was found.
|
||||||
|
|
||||||
@ -146,13 +146,13 @@ module HTTPX
|
|||||||
|
|
||||||
emit_resolve_error(connection)
|
emit_resolve_error(connection)
|
||||||
when :decode_error
|
when :decode_error
|
||||||
host, connection = @queries.first
|
host = @requests.delete(request)
|
||||||
reset_hostname(host)
|
connection = reset_hostname(host)
|
||||||
emit_resolve_error(connection, connection.origin.host, result)
|
emit_resolve_error(connection, connection.origin.host, result)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_addresses(answers)
|
def parse_addresses(answers, request)
|
||||||
if answers.empty?
|
if answers.empty?
|
||||||
# no address found, eliminate candidates
|
# no address found, eliminate candidates
|
||||||
host = @requests.delete(request)
|
host = @requests.delete(request)
|
||||||
|
@ -32,6 +32,8 @@ module HTTPX
|
|||||||
|
|
||||||
def parse: (Request request, Response response) -> void
|
def parse: (Request request, Response response) -> void
|
||||||
|
|
||||||
|
def parse_addresses: (Array[dns_result] answers, Request request) -> void
|
||||||
|
|
||||||
def build_request: (String hostname) -> Request
|
def build_request: (String hostname) -> Request
|
||||||
|
|
||||||
def decode_response_body: (Response) -> dns_decoding_response
|
def decode_response_body: (Response) -> dns_decoding_response
|
||||||
|
Loading…
x
Reference in New Issue
Block a user