Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-10438

Add method attribute to request-map to controll a uri can be called GET or POST only

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Trunk
    • 18.12.01
    • framework

    Description

      As discussed in OFBIZ-4274, OFBiz runs doGet method in ControlServlet no matter what request it is.

      I like Mathieu's comment on adding a method attribute to the request-map element, it's almost the same as we implemented in our openapi:

      <request-map uri="examples" method="get">
         <security https="true" auth="true"/>
         <event type="java" path="ExamplesHandlers" invoke="getExamples"/>
         <response name="success" type="view" value="..."/>
         <response name="error" type="view" value="..."/>
      </request-map>
      

      The difference is that we DON'T support method list expression:

      <request-map uri="examples" method="get,post">...</request-map>
      

      Attachments

        1. OFBIZ-10438_0001-Add-optional-method-attribute-in-request.patch
          2 kB
          Mathieu Lirzin
        2. OFBIZ-10438_0002-Parse-controller-config-in-one-place.patch
          22 kB
          Mathieu Lirzin
        3. OFBIZ-10438_0003-Handle-multiple-request-methods.patch
          38 kB
          Mathieu Lirzin
        4. OFBIZ-10438_Fix-resolveURI.patch
          3 kB
          Mathieu Lirzin
        5. URL-Error-additem.png
          125 kB
          Deepak Nigam
        6. URL-Error-SelectShipping.png
          128 kB
          Deepak Nigam

        Issue Links

          Activity

            People

              jleroux Jacques Le Roux
              shi.jinghai Shi Jinghai
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: