Ad Widget

Collapse

Zabbix 1.5 - Invalid URLs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Zabbix 1.5 - Invalid URLs

    Using HHTPWatch, I noticed that there are some invalid URLs either in the page_header or page_footer because it happens on every web page. This probably slows things down a little bit. The invalid URL is "https://:/". Below you will find the output of my HTTPWatch.

    Code:
    https://host.domain.com/zabbix/
    https://host.domain.com/zabbix/css.css
    https://host.domain.com/zabbix/styles/default.css
    https://host.domain.com/zabbix/js/common.js
    https://host.domain.com/zabbix/styles/div.css
    https://host.domain.com/zabbix/styles/link.css
    https://host.domain.com/zabbix/styles/table.css
    https://host.domain.com/zabbix/styles/form.css
    https://host.domain.com/zabbix/styles/ul.css
    https://host.domain.com/zabbix/styles/p.css
    https://host.domain.com/zabbix/styles/popupmenu.css
    https://host.domain.com/zabbix/styles/bar.css
    https://host.domain.com/zabbix/styles/gmenu.css
    https://host.domain.com/zabbix/styles/sbox.css
    https://host.domain.com/zabbix/js/prototype.js
    https://:/
    https://:/
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Mmm, my Apache access log doesn't show anything like that...
    Zabbix | ex GUI developer

    Comment

    • Palmertree
      Senior Member
      • Sep 2005
      • 746

      #3
      You would not see them in the apache logs because the url will never hit the server since there is no host.domain.com in the url. Apache should only show you hits I believe.

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        Reasonable notice.. But I don't see such queries going from my browser either.
        Maybe asynchronous queries is shown like that?!
        Zabbix | ex GUI developer

        Comment

        • Palmertree
          Senior Member
          • Sep 2005
          • 746

          #5
          I wonder if this is https specific. prototype.js is last thing loaded before the https://:/.

          I noticed the following in prototype.js:

          isSameOrigin: function() {
          var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
          return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
          protocol: location.protocol,
          domain: document.domain,
          port: location.port ? ':' + location.port : ''
          }));
          },

          I wonder if this is causing this?

          Comment

          • Aly
            ZABBIX developer
            • May 2007
            • 1126

            #6
            There is only comparisons, no query.
            Zabbix | ex GUI developer

            Comment

            • Palmertree
              Senior Member
              • Sep 2005
              • 746

              #7
              Good point. I will keep looking.

              Comment

              • Palmertree
                Senior Member
                • Sep 2005
                • 746

                #8
                If I comment out prototype.js in pageheader.inc.php the https://:/ links go away. I am go to start commenting out things in the prototype.js file itself to try and determine where it is in the code.

                Comment

                • Palmertree
                  Senior Member
                  • Sep 2005
                  • 746

                  #9
                  I found the problem.

                  The problem does not occur when using Version 1.5.1.2 of prototype.js but occurs in version 1.6.0.0 and above. The problem is due to the following line:

                  document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");

                  Here is some links that reference the same issue with other apps using the JavaScript:



                  To correct the problem I modified the following in prototype.js:

                  Code:
                      document.write("<script id=__onDOMContentLoaded defer [COLOR="red"]src=//:[/COLOR]><\/script>");
                      $("__onDOMContentLoaded").onreadystatechange = function() {
                        if (this.readyState == "complete") {
                          this.onreadystatechange = null;
                          fireContentLoadedEvent();

                  Code:
                      document.write("<script id=__onDOMContentLoaded defer [COLOR="Red"]src=javascript:void(0)[/COLOR]><\/script>");
                      $("__onDOMContentLoaded").onreadystatechange = function() {
                        if (this.readyState == "complete") {
                          this.onreadystatechange = null;
                          fireContentLoadedEvent();
                  I am not seeing the https://:/ invalid urls anymore with httpwatch.

                  Comment

                  • Aly
                    ZABBIX developer
                    • May 2007
                    • 1126

                    #10
                    Are thous requests seen only when open an encrypted pages or a simple pages too? Because I really can't catch them, at least on unencrypted host.
                    Zabbix | ex GUI developer

                    Comment

                    • Palmertree
                      Senior Member
                      • Sep 2005
                      • 746

                      #11
                      Good question. I will turn off https and see. The request will never hit the web server since the url is invalid. Not sure if you every used httpwatch before but you can download a stripped down version for free I believe. It's a very usefull program. :-)


                      Update Post: It looks like the free version is only good for a limited number of well known sites. :-(

                      I will test http and report my findings.
                      Last edited by Palmertree; 07-04-2008, 19:08.

                      Comment

                      • Aly
                        ZABBIX developer
                        • May 2007
                        • 1126

                        #12
                        I monitor queries not on the server but directly from the browser, this as I understood is IE related problem, on IE I use "The Fiddler" tool to monitor connections.
                        Zabbix | ex GUI developer

                        Comment

                        • Palmertree
                          Senior Member
                          • Sep 2005
                          • 746

                          #13
                          Cool. I've used Fiddler too and it is also a good resource tool. This sounds like it must be a https type problem. :-)

                          Comment

                          Working...