Fossil SCM
Fix the error output for command-line option errors on the "fossil http" command.
Commit
648dc3e7046d657ae4a0ad2cbbf976b9fce22812
Parent
60af05741590fa9…
1 file changed
+1
-1
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2176,18 +2176,18 @@ | ||
| 2176 | 2176 | zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */ |
| 2177 | 2177 | cgi_replace_parameter("HTTPS","on"); |
| 2178 | 2178 | } |
| 2179 | 2179 | zHost = find_option("host", 0, 1); |
| 2180 | 2180 | if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost); |
| 2181 | - g.cgiOutput = 1; | |
| 2182 | 2181 | |
| 2183 | 2182 | /* We should be done with options.. */ |
| 2184 | 2183 | verify_all_options(); |
| 2185 | 2184 | |
| 2186 | 2185 | if( g.argc!=2 && g.argc!=3 && g.argc!=5 && g.argc!=6 ){ |
| 2187 | 2186 | fossil_fatal("no repository specified"); |
| 2188 | 2187 | } |
| 2188 | + g.cgiOutput = 1; | |
| 2189 | 2189 | g.fullHttpReply = 1; |
| 2190 | 2190 | if( g.argc>=5 ){ |
| 2191 | 2191 | g.httpIn = fossil_fopen(g.argv[2], "rb"); |
| 2192 | 2192 | g.httpOut = fossil_fopen(g.argv[3], "wb"); |
| 2193 | 2193 | zIpAddr = g.argv[4]; |
| 2194 | 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 | 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 |