Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-3244

stats_over_http plugin does not get the optional path argument properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.2.0, 5.3.0
    • Plugins
    • None

    Description

      To override the default path for stats_over_http.so with your own, you should add this to plugin.config:

      stats_over_http.so /my_stats_path
      

      This no longer works. Patch would be

      diff --git a/plugins/stats_over_http/stats_over_http.c b/plugins/stats_over_http/stats_over_http.c
      index 720a7e7..9c4f8bf 100644
      --- a/plugins/stats_over_http/stats_over_http.c
      +++ b/plugins/stats_over_http/stats_over_http.c
      @@ -312,8 +312,8 @@ init:
         argc -= optind;
         argv += optind;
       
      -  if (argc > 1) {
      -    url_path = TSstrdup(argv[1] + ('/' == argv[1][0] ? 1 : 0)); /* Skip leading / */
      +  if (argc > 0) {
      +    url_path = TSstrdup(argv[0] + ('/' == argv[0][0] ? 1 : 0)); /* Skip leading / */
         }
         url_path_len = strlen(url_path);
       

      Attachments

        1. stats_getopt.diff
          0.5 kB
          Susan Hinrichs

        Activity

          People

            zwoop Leif Hedstrom
            zwoop Leif Hedstrom
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: