Moodle
  1. Moodle
  2. MDL-10171

Mnet : remove trailing slash from wwwroot for test client

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.8.1
    • Fix Version/s: 1.8.4, 1.9, 2.0
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      29393

      Description

      In testclient.php, trailing slash from wwwroot must be removed.
      Workaround: people should edit the wwwroot field in their config.php to remove the trailing slash.

      Here is a fix:

      Index: testclient.php
      ===================================================================
      RCS file: /cvsroot/moodle/moodle/mnet/testclient.php,v
      retrieving revision 1.1
      diff -u -r1.1 testclient.php
      — testclient.php 4 Jan 2007 02:33:52 -0000 1.1
      +++ testclient.php 19 Jun 2007 07:38:41 -0000
      @@ -31,6 +31,9 @@

      // For the demo, our 'remote' host is actually our local host.
      $wwwroot = $CFG->wwwroot;
      +if (substr($wwwroot, -1, 1) == '/')

      { + $wwwroot = substr($wwwroot, 0, -1); +}

      // Enter the complete path to the file that contains the function you want to
      // call on the remote server. In our example the function is in

        Activity

        Hide
        Donal McMullan added a comment -

        Hi Arnaud - the old testclient.php was really buggy - I hadn't kept it up to date with the API. I also thought it maybe wasn't very useful, so I rewrote it as a remote-service browser. There's not much of the old code in there anymore.

        Now you can click on a host and drill down into the services and methods that it is publishing to your host. You can see the method profiles and descriptions (taken from the methods' docblocks).

        I hope you consider this an improvement!

        Show
        Donal McMullan added a comment - Hi Arnaud - the old testclient.php was really buggy - I hadn't kept it up to date with the API. I also thought it maybe wasn't very useful, so I rewrote it as a remote-service browser. There's not much of the old code in there anymore. Now you can click on a host and drill down into the services and methods that it is publishing to your host. You can see the method profiles and descriptions (taken from the methods' docblocks). I hope you consider this an improvement!

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: