# Host: is always set to the name of the host (unless overridden)
# User-Agent: is set to default above (unless overridden)
#
# Host: is always set to the name of the host (unless overridden)
# User-Agent: is set to default above (unless overridden)
#
$conn->{state} = 'waitreply';
$conn->{filter} = delete $args{filter} if exists $args{filter};
$conn->{prefix} = delete $args{prefix} if exists $args{prefix};
$conn->{state} = 'waitreply';
$conn->{filter} = delete $args{filter} if exists $args{filter};
$conn->{prefix} = delete $args{prefix} if exists $args{prefix};
- dbg("Sending 'GET $path HTTP/1.0'") if isdbg('async');
- $conn->send_later("GET $path HTTP/1.0\n");
+ dbg("Sending '$sort $path HTTP/1.0'") if isdbg('async');
+ $conn->send_later("$sort $path HTTP/1.0\n");
+
my $h = delete $args{Host} || $host;
my $u = delete $args{'User-Agent'} || "DxSpider;$main::version;$main::build;$^O;$main::mycall";
my $h = delete $args{Host} || $host;
my $u = delete $args{'User-Agent'} || "DxSpider;$main::version;$main::build;$^O;$main::mycall";
$conn->send_later("Host: $h\n");
$conn->send_later("User-Agent: $u\n");
while (my ($k,$v) = each %args) {
$conn->send_later("$k: $v\n");
}
$conn->send_later("Host: $h\n");
$conn->send_later("User-Agent: $u\n");
while (my ($k,$v) = each %args) {
$conn->send_later("$k: $v\n");
}
# do a raw connection
#
# Async->raw($self, <host>, <port>, [handler => CODE ref], [prefix => <string>]);
# do a raw connection
#
# Async->raw($self, <host>, <port>, [handler => CODE ref], [prefix => <string>]);