Deleted Added
full compact
27c27
< # $FreeBSD: head/usr.sbin/bsdconfig/share/media/http.subr 252987 2013-07-07 18:51:44Z dteske $
---
> # $FreeBSD: head/usr.sbin/bsdconfig/share/media/http.subr 253333 2013-07-14 03:08:52Z dteske $
513c513
< # f_media_get_http $device $file [$probe_only]
---
> # f_media_get_http $device $file [$probe_type]
517c517
< # gathered from the environment. If $probe_only is both present and non-NULL,
---
> # gathered from the environment. If $probe_type is both present and non-NULL,
519a520,521
> # If $probe_type is equal to $PROBE_SIZE, prints the content-length in bytes
> # from the response (or -1 if not found) to standard-out.
545c547
< local dev="$1" file="$2" probe_only="$3" hosts=
---
> local dev="$1" file="$2" probe_type="$3" hosts=
547,548c549,550
< f_dprintf "f_media_get_http: dev=[%s] file=[%s] probe_only=%s" \
< "$dev" "$file" "$probe_only"
---
> f_dprintf "f_media_get_http: dev=[%s] file=[%s] probe_type=%s" \
> "$dev" "$file" "$probe_type"
594c596
< rv=0
---
> rv=0 length=-1
601a604,610
> "Content-Length: "*)
> length="${LINE%
> }"
> length="${length#Content-Length: }"
> f_dprintf "received content-length: %s" \
> "$length"
> ;;
614c623
< if [ ! "$probe_only" ]; then
---
> if [ ! "$probe_type" ]; then
615a625,627
> elif [ "$probe_type" = "$PROBE_SIZE" ]; then
> f_isinteger "$length" || length=-1
> echo "$length"
621c633
< [ "$probe_only" ] && return $FAILURE
---
> [ "$probe_type" ] && return $FAILURE