Fossil

View Ticket
Login

View Ticket

2011-08-30
16:27 Fixed ticket [bfb8427cdd]: Cloning and syncing an URL with no repository or misconfigured CGI repository fails silently. plus 2 other changes ... (artifact: 953bbf721b user: lrem)
2009-11-11
14:59
Better error messages when "sync" fails due to server problems. Ticket [bfb8427cdd5] ... (check-in: 0690aa18a4 user: drh tags: trunk)
2009-10-11
21:31
Panic on bad server responses. Ticket [bfb8427cdd]. ... (check-in: 21a2a18145 user: dmitry tags: trunk)
21:22 Ticket [bfb8427cdd] Cloning and syncing an URL with no repository or misconfigured CGI repository fails silently. status still Open with 1 other change ... (artifact: e64442b769 user: anonymous)
21:14 Ticket [bfb8427cdd]: 1 change ... (artifact: 87b773beb1 user: anonymous)
2009-10-10
10:06 Ticket [bfb8427cdd]: 1 change ... (artifact: 82d4a349fb user: anonymous)
09:16 Ticket [bfb8427cdd]: 1 change ... (artifact: d2163c1c2d user: anonymous)
09:13 Ticket [bfb8427cdd]: 4 changes ... (artifact: e1925b83ec user: anonymous)
2009-09-19
02:07 New ticket [bfb8427cdd]. ... (artifact: bbe9ff42f8 user: anonymous)

Ticket Hash: bfb8427cdd5b601486d532c378fba652d52af037
Title: Cloning and syncing an URL with no repository or misconfigured CGI repository fails silently.
Status: Fixed Type: Code_Defect
Severity: Severe Priority:
Subsystem: Resolution: Fixed
Last Modified: 2011-08-30 16:27:08
Version Found In: [0eb08b860c], [37f295c310], [b99aa66d1f]
Description:
If a CGI script lacks execution permissions by accident, cloning from it generates no error messages of any kind. All that happens is that an empty repository is created.

anonymous claiming to be Dmitry Chestnykh added on 2009-10-10 09:13:42:
There's no error reporting at all even for wrong URLs. I mistakenly used a wrong URL (.com instead of .org) for my server to clone/push/pull/sync and was wondering why it doesn't sync.

Here's an example session:

~ $ fossil clone http://example.com/404/ test
                Bytes      Cards  Artifacts     Deltas
Send:             597         24          0          0
Received:           0          0          0          0
Total network traffic: 447 bytes sent, 463 bytes received
Rebuilding repository meta-data...
0 (0%)...
project-id: (null)
server-id:  a3f3933d58f406f54a82902fb5b57b1e8d24a9af
admin-user: dmitry (password is "a666f9")

~ $ fossil open test

~ $ fossil sync http://example.com/NOTHING/ Bytes Cards Artifacts Deltas Send: 137 2 0 0 Received: 0 2 0 0 Total network traffic: 303 bytes sent, 467 bytes received


anonymous claiming to be Dmitry Chestnykh added on 2009-10-11 21:14:28:
I've tracked this down to http_exchange function in http.c. It correctly identifies non-200 HTTP responses:

      if( rc!=200 ) goto write_err;

However, it just goes to write_err where it simply closes the connection and doesn't output errors (perhaps, it should panic after closing the connection?), so Fossil just continues creating a new repository with zero data.


anonymous claiming to be Dmitry Chestnykh added on 2009-10-11 21:22:27:
Perhaps, something like this would do:

--- src/http.c
+++ src/http.c
@@ -235,7 +235,7 @@
   /*
   ** Jump to here if an error is seen.
   */
 write_err:
   transport_close();
-  return;
+  fossil_panic("bad server response");
 }

lrem added on 2011-08-30 16:27:08 UTC:
Fixed for an unknown time.