Check-in [90c4859315]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:We can detect when to enable compatibility mode, so do this instead of requiring an explicit argument.
Timelines: family | ancestors | ssh-test-http
Files: files | file ages | folders
SHA1:90c4859315b63033c3b021d39f60e9cc413a3ed8
User & Date: andybradford 2013-08-19 14:48:21
Context
2013-08-19
14:48
We can detect when to enable compatibility mode, so do this instead of requiring an explicit argument. Leaf check-in: 90c4859315 user: andybradford tags: ssh-test-http
2013-08-18
01:26
Use a little more precaution that the Fossil command has been seen first. check-in: 12dbaebec2 user: andybradford tags: ssh-test-http
Changes

Changes to src/cgi.c.

  1470   1470         malformed_request("malformed probe");
  1471   1471       }
  1472   1472     }
  1473   1473   
  1474   1474     /* Got all probes now first transport_open is completed
  1475   1475     ** so return the command that was requested
  1476   1476     */
  1477         -  /* *zCmd = mprintf("%s", zToken); */
         1477  +  g.fSshClient |= CGI_SSH_COMPAT;
  1478   1478     return mprintf("%s", zToken);
  1479   1479   }
  1480   1480   
  1481   1481   /*
  1482   1482   ** This routine handles the old fossil SSH transport_flip
  1483   1483   ** and transport_open communications if detected.
  1484   1484   */

Changes to src/main.c.

  1724   1724   
  1725   1725   /*
  1726   1726   ** Note that the following command is used by ssh:// processing.
  1727   1727   **
  1728   1728   ** COMMAND: test-http
  1729   1729   ** Works like the http command but gives setup permission to all users.
  1730   1730   **
  1731         -** Options:
  1732         -**   --ssh-compat        Compatibility option for SSH keys and old clients
  1733   1731   */
  1734   1732   void cmd_test_http(void){
  1735   1733     const char *zIpAddr;    /* IP address of remote client */
  1736   1734   
  1737         -  if( find_option("ssh-compat", 0, 0)!=0 ) g.fSshClient |= CGI_SSH_COMPAT;
  1738   1735     Th_InitTraceLog();
  1739   1736     login_set_capabilities("sx", 0);
  1740   1737     g.useLocalauth = 1;
  1741   1738     g.httpIn = stdin;
  1742   1739     g.httpOut = stdout;
  1743   1740     find_server_repository(0);
  1744   1741     g.cgiOutput = 1;