XMLWordPrintable

    • Icon: Change Request (Sub-task) Change Request (Sub-task)
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • None
    • Frontend (F)
    • ZABBIX 1.8 & Trunk

      I noticed the other day that a 301 or 302 redirect in the WEB monitoring module can never be evaluated, since the "CURLOPT_FOLLOWLOCATION" is statically set to "1". This means, that whenever the WEB monitoring encounters a 301, it will follow that redirect and ultimately return the HTTP response of the target destination.

      This behavior is counter-intuitive and confusing and at least should be documented.

      I have written a patch (currently applies against 1.8 and Trunk) that makes this option configurable from the GUI, on a per-step basis. This patch introduces a new checkbox, "Follow", in the WEB scenario's step configuration. If the checkbox is set, CURL will behave like it does right now (i.e. follow HTTP redirects). If the checkbox is unset, CURL will not follow the redirect and instead return the appropriate HTTP response code for the check (i.e. 301, 302). The default setting for "Follow" when creating a new step is "On", so it will not break current behavior for most users even when the option is overseen.

      Prerequisites for the patch is a minor change into database table "httpstep":

      ALTER TABLE httpstep ADD COLUMN (follow TINYINT(1) DEFAULT 1 NOT NULL)

        1. curl-follow.patch
          9 kB
        2. curl-follow-2.patch
          10 kB
        3. curl-follow-3.patch
          10 kB
        4. curl-follow-4.patch
          10 kB
        5. curl-follow-5.patch
          10 kB
        6. curl-follow-6.patch
          10 kB

            Unassigned Unassigned
            jfischer J. Fischer
            Votes:
            8 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: