mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Http_server: Fix full-text search not working
This commit is contained in:
@@ -75,7 +75,7 @@ public class Xoa_cmd_arg_mgr {
|
||||
, Gfo_cmd_arg_itm_.opt_("server_port_recv").Example_("55000").Note_("applies to --app_mode server; port where xowa server will receive messages; clients should send messages to this port")
|
||||
, Gfo_cmd_arg_itm_.opt_("server_port_send").Example_("55001").Note_("applies to --app_mode server; port where xowa server will send messages; clients should listen for messages from this port")
|
||||
, Gfo_cmd_arg_itm_.opt_("http_server_port").Example_("8080").Note_("applies to --app_mode http_server; port used by http_server; default is 8080")
|
||||
, Gfo_cmd_arg_itm_.opt_("http_server_home").Example_("home/wiki/Main_Page").Note_("applies to --app_mode http_server; default home page for root address. EX: navigating to localhost:8080 will navigate to localhost:8080/home/wiki/Main_Page")
|
||||
, Gfo_cmd_arg_itm_.opt_("http_server_home").Example_("home/wiki/Main_Page").Note_("applies to --app_mode http_server; default home page for root address. EX: navigating to localhost:8080 will navigate to localhost:8080/home/wiki/Main_Page. To navigate to a wiki's main page, use the domain name only. EX: --http_server_home en.wikipedia.org")
|
||||
, Gfo_cmd_arg_itm_.opt_("http_server.max_clients").Example_("15").Note_("applies to --app_mode http_server; limits maximum number of concurrent connections; default is 0 (no limit)")
|
||||
, Gfo_cmd_arg_itm_.opt_("http_server.max_clients_timeout").Example_("50").Note_("applies to --app_mode http_server; time in milliseconds to wait before checking again to see if a connection is free; default is 50 (wait 50 ms)")
|
||||
, Gfo_cmd_arg_itm_.sys_("show_license").Dflt_(true)
|
||||
|
||||
@@ -161,13 +161,16 @@ class Xosrv_http_wkr_ {
|
||||
public static void Write_response_as_html(Http_client_wtr client_wtr, boolean cross_domain, String html) {Write_response_as_html(client_wtr, cross_domain, Bry_.new_u8(html));}
|
||||
public static void Write_response_as_html(Http_client_wtr client_wtr, boolean cross_domain, byte[] html) {
|
||||
try{
|
||||
client_wtr.Write_bry(Rsp__http_ok);
|
||||
// TODO_OLD: add command-line argument to allow testing from local file
|
||||
// if (cross_domain)
|
||||
// client_wtr.Write_str("Access-Control-Allow-Origin: *\n"); // No 'Access-Control-Allow-Origin' header is present on the requested resource.
|
||||
client_wtr.Write_bry(Rsp__content_type_html);
|
||||
client_wtr.Write_bry(Byte_ascii.Nl_bry);
|
||||
client_wtr.Write_bry(html);
|
||||
client_wtr.Write_bry
|
||||
( Bry_.Add
|
||||
( Rsp__http_ok
|
||||
, Rsp__content_type_html
|
||||
, Byte_ascii.Nl_bry
|
||||
, html
|
||||
));
|
||||
} catch (Exception err) {
|
||||
client_wtr.Write_str("Site not found. Check address please, or see console log.\n" + Err_.Message_lang(err));
|
||||
client_wtr.Rls();
|
||||
|
||||
Reference in New Issue
Block a user