Uploaded image for project: 'OpenAM Agents'
  1. OpenAM Agents
  2. AMAGENTS-349

GET method can change into HEAD due to use of ap_method_name_of

    XMLWordPrintable

    Details

      Description

      ap_method_name_of depends on iterations on a hash to retrieve the name of a method based on a value. In this, then both GET and HEAD have the same value, therefore this cannot be relied on.

      Currently logic overwrites GET with HEAD if the ap_method_name_of(0) returns HEAD. This then is encoded back into a different am method which has distinct values for GET and HEAD.
      eg doing a lookup based on this array:

      const char *request_method_str[] =

      { "UNKNOWN", "GET", "POST", "HEAD", ... }

      Note there is a valid case for changing GET into HEAD (if method_number==M_GET and header_only>0) that should be respected once this is fixed.

      ACTUAL BEHAVIOUR

      Sometimes GET can be changed into HEAD incorrectly

      CORRECT BEHAVIOUR
      GET should only be changed into HEAD when (if method_number==M_GET and header_only>0)

        Attachments

          Issue Links

            Activity

              People

              mareks Mareks Malnacs
              alex.levin@forgerock.com Alex Levin
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: