Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpd-start customization #3

Merged
merged 1 commit into from
May 8, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions simple-httpd.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
;;; Commentary:

;; Use `httpd-start' to start the web server. Files are served from
;; `httpd-root' on port `httpd-port'. While the root can be changed at
;; any time, the server needs to be restarted in order for a port
;; change to take effect.
;; `httpd-root' on port `httpd-port' using `httpd-ip-family' at host
;; `httpd-host'. While the root can be changed at any time, the server
;; needs to be restarted in order for a port change to take effect.

;; Everything is performed by servlets, including serving
;; files. Servlets are enabled by setting `httpd-servlets' to true
Expand Down Expand Up @@ -102,6 +102,16 @@
"A simple web server."
:group 'comm)

(defcustom httpd-ip-family 'ipv4
"Web server IP family used by `make-network-process'"
:group 'simple-httpd
:type 'symbol)

(defcustom httpd-host 'local
"Web server host name used by `make-network-process'"
:group 'simple-httpd
:type 'symbol)

(defcustom httpd-port 8080
"Web server port."
:group 'simple-httpd
Expand Down Expand Up @@ -233,7 +243,8 @@ per Emacs instance."
:name "httpd"
:service httpd-port
:server t
:family 'ipv4
:host httpd-host
:family httpd-ip-family
:filter 'httpd--filter
:filter-multibyte nil
:coding 'utf-8-unix ; *should* be ISO-8859-1 but that doesn't work
Expand Down