mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
sample: drop uri_root from base_url in http-server.
By default there is "0.0.0.0", and this address will work only from the same machine, and besides there is no need in uri_root in base_url, because it will be added automatically by browser.
This commit is contained in:
parent
1c06985a01
commit
6171e1c294
@ -248,13 +248,13 @@ send_document_cb(struct evhttp_request *req, void *arg)
|
||||
|
||||
evbuffer_add_printf(evb, "<html>\n <head>\n"
|
||||
" <title>%s</title>\n"
|
||||
" <base href='%s%s%s'>\n"
|
||||
" <base href='%s%s'>\n"
|
||||
" </head>\n"
|
||||
" <body>\n"
|
||||
" <h1>%s</h1>\n"
|
||||
" <ul>\n",
|
||||
decoded_path, /* XXX html-escape this. */
|
||||
uri_root, path, /* XXX html-escape this? */
|
||||
path, /* XXX html-escape this? */
|
||||
trailing_slash,
|
||||
decoded_path /* XXX html-escape this */);
|
||||
#ifdef _WIN32
|
||||
|
Loading…
x
Reference in New Issue
Block a user