Fossil SCM

Fix the error output for command-line option errors on the "fossil http" command.

drh 2015-05-14 18:31 trunk
Commit 648dc3e7046d657ae4a0ad2cbbf976b9fce22812
1 file changed +1 -1
+1 -1
--- src/main.c
+++ src/main.c
@@ -2176,18 +2176,18 @@
21762176
zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */
21772177
cgi_replace_parameter("HTTPS","on");
21782178
}
21792179
zHost = find_option("host", 0, 1);
21802180
if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost);
2181
- g.cgiOutput = 1;
21822181
21832182
/* We should be done with options.. */
21842183
verify_all_options();
21852184
21862185
if( g.argc!=2 && g.argc!=3 && g.argc!=5 && g.argc!=6 ){
21872186
fossil_fatal("no repository specified");
21882187
}
2188
+ g.cgiOutput = 1;
21892189
g.fullHttpReply = 1;
21902190
if( g.argc>=5 ){
21912191
g.httpIn = fossil_fopen(g.argv[2], "rb");
21922192
g.httpOut = fossil_fopen(g.argv[3], "wb");
21932193
zIpAddr = g.argv[4];
21942194
--- src/main.c
+++ src/main.c
@@ -2176,18 +2176,18 @@
2176 zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */
2177 cgi_replace_parameter("HTTPS","on");
2178 }
2179 zHost = find_option("host", 0, 1);
2180 if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost);
2181 g.cgiOutput = 1;
2182
2183 /* We should be done with options.. */
2184 verify_all_options();
2185
2186 if( g.argc!=2 && g.argc!=3 && g.argc!=5 && g.argc!=6 ){
2187 fossil_fatal("no repository specified");
2188 }
 
2189 g.fullHttpReply = 1;
2190 if( g.argc>=5 ){
2191 g.httpIn = fossil_fopen(g.argv[2], "rb");
2192 g.httpOut = fossil_fopen(g.argv[3], "wb");
2193 zIpAddr = g.argv[4];
2194
--- src/main.c
+++ src/main.c
@@ -2176,18 +2176,18 @@
2176 zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */
2177 cgi_replace_parameter("HTTPS","on");
2178 }
2179 zHost = find_option("host", 0, 1);
2180 if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost);
 
2181
2182 /* We should be done with options.. */
2183 verify_all_options();
2184
2185 if( g.argc!=2 && g.argc!=3 && g.argc!=5 && g.argc!=6 ){
2186 fossil_fatal("no repository specified");
2187 }
2188 g.cgiOutput = 1;
2189 g.fullHttpReply = 1;
2190 if( g.argc>=5 ){
2191 g.httpIn = fossil_fopen(g.argv[2], "rb");
2192 g.httpOut = fossil_fopen(g.argv[3], "wb");
2193 zIpAddr = g.argv[4];
2194

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button