Lines Matching +full:rx +full:- +full:eq
3 # Copyright (c) 2012-2013 Devin Teske
79 # The order in-which the below individual cases appear is important!
85 port="${port%%[!0-9]*}"
104 : leave hostname as-is
129 # $connect_only is present and non-null, then returns success if a connection
144 # $connect_only is present and non-NULL.
174 f_quietly nc -nz "$host" "$proxy_port" || continue
198 local rx
199 if ! rx=$(
201 nc -n "$host" "$proxy_port"
210 hdr=$( echo "$rx" | awk '/^\r$/{exit}{print}' )
259 # Usually set to `uname -r' but can be overridden.
317 [ $http_found -eq $SUCCESS ] && break
335 # non-NULL, this function exits after receiving the HTTP header response from
338 # content-length in bytes from the response (or -1 if not found) to standard-
350 # URL (including "ftp://" protocol-prefix) of FTP directory to
389 f_quietly nc -nz "$host" "$proxy_port" || continue
401 local url="$proxy_path/$file$mode" rx
404 printf "GET %s HTTP/1.0\r\n\r\n" "$url" | nc -n "$host" "$proxy_port" |
411 rv=0 length=-1
416 set -- $LINE; rv=$2
419 "Content-Length: "*)
422 length="${length#Content-Length: }"
423 f_dprintf "received content-length: %s" \
432 [ $rv -ge 500 ] && exit 5
433 [ $rv -eq 404 ] && exit 44
434 [ $rv -ge 400 ] && exit 4
435 [ $rv -ge 300 ] && exit 3
436 [ $rv -eq 200 ] || exit $FAILURE
439 cat # output the rest ``as-is''
441 f_isinteger "$length" || length=-1
447 [ $retval -eq 200 ] && return $SUCCESS