shithub: riscv

ref: 11fa01778a4a798b9cf6a45f216003b9aca227b3
dir: /sys/man/4/httpfile/

View raw version
.TH HTTPFILE 4
.SH NAME
httpfile \- serve a single web file
.SH SYNOPSIS
.B ip/httpfile
[
.B -9d
]
[
.B -c
.I count
]
[
.B -f
.I file
]
[
.B -m
.I mtpt
]
[
.B -s
.I srvname
]
.I url
.SH DESCRIPTION
.I Httpfile
serves the web page specified by the URL
.I url
as a new file
.I file
in the directory
.IR mtpt .
The default
.I file
is the last path element of the URL,
and the default
.I mtpt
is the current directory.
.PP
.I Httpfile
does not download large files all at once.
Instead, it requests 64-kilobyte blocks as they are
needed to satisfy reads, caching a few blocks in memory at a time.
.PP
The 
.B -D
and
.B -d
options enable a trace of the 9P traffic
and general debugging messages.
.PP
The
.B -s
option causes 
.I httpfile
to post the 9P service as
.BI /srv/ srvname
and disables the default mount.
.PP
The
.B -c
option sets the number of file blocks kept cached in memory (default 32).
.SH EXAMPLE
Mount an ISO image on a web server:
.IP
.EX
ip/httpfile http://www.r-36.net/9front/9front.iso
9660srv
mount /srv/9660 /n/iso 9front.iso
.EE
.SH SOURCE
.B /sys/src/cmd/ip/httpfile.c
.SH "SEE ALSO"
.IR hget (1),
.IR webfs (4)
.SH DIAGNOSTICS
.I Httpfile
requires
.IR webfs (4)
service mounted on
.B /mnt/web
to work.