Fossil

Artifact [bd6d1958ba]
Login

Artifact bd6d1958ba0a71ba16a8b481d6b9c2951daf452e:

Ticket change [bd6d1958ba] - New ticket [e704dbd96760f681|e704dbd967] <i>server command doesn&#39;t accept --localhost</i>. by mjanssen 2013-06-24 08:58:42.
D 2013-06-24T08:58:42.809
J foundin ae0124439685c110
J icomment The\sserver\scommand\sdoesn't\saccept\s--localhost.\sThe\sreason\sis\sthat\sin\smain.c\sthe\sargument\scount\scheck\sfor\sthe\sserver\scommand\sis\sdone\sbefore\sthe\scheck\sfor\sthe\s--localhost\soption.\r\n\r\nDiff\sbelow\sshould\sfix\sit\s(can't\stest\satm)\r\n\r\nIndex:\ssrc/main.c\r\n==================================================================\r\n---\ssrc/main.c\r\n+++\ssrc/main.c\r\n@@\s-1803,18\s+1803,19\s@@\r\n\s\s\szPort\s=\sfind_option("port",\s"P",\s1);\r\n\s\s\szNotFound\s=\sfind_option("notfound",\s0,\s1);\r\n\s\s\szAltBase\s=\sfind_option("baseurl",\s0,\s1);\r\n\s\s\sif(\szAltBase\s){\r\n\s\s\s\s\sset_base_url(zAltBase);\r\n+\s\s}\r\n+\s\sif\s(\sfind_option("localhost",\s0,\s0)!=0\s){\r\n+\s\s\s\sflags\s|=\sHTTP_SERVER_LOCALHOST;\r\n\s\s\s}\r\n\s\s\sif(\sg.argc!=2\s&&\sg.argc!=3\s)\susage("?REPOSITORY?");\r\n\s\s\sisUiCmd\s=\sg.argv[1][0]=='u';\r\n\s\s\sif(\sisUiCmd\s){\r\n\s\s\s\s\sflags\s|=\sHTTP_SERVER_LOCALHOST;\r\n\s\s\s\s\sg.useLocalauth\s=\s1;\r\n-\s\s}else\sif\s(\sfind_option("localhost",\s0,\s0)!=0\s){\r\n-\s\s\s\sflags\s|=\sHTTP_SERVER_LOCALHOST;\r\n\s\s\s}\r\n\s\s\sfind_server_repository(isUiCmd\s&&\szNotFound==0);\r\n\s\s\sif(\szPort\s){\r\n\s\s\s\s\sint\si;\r\n\s\s\s\s\sfor(i=strlen(zPort)-1;\si>=0\s&&\szPort[i]!=':';\si--){}
J login mjanssen
J mimetype text/x-fossil-plain
J severity Important
J status Open
J title server\scommand\sdoesn't\saccept\s--localhost
J type Code_Defect
K e704dbd96760f6817bc156a8b510bd15430e81b9
U mjanssen
Z 57ba9b3ccaa7beff9ea1627a2aa44a3e