[
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585808#comment-16585808 ]
Taher Alkhateeb commented on OFBIZ-10438:
-----------------------------------------
Hey guys, sorry, for some reason while typing on the keyboard I got assigned the task, released myself.
First of all, thank you Mathieu for your work in resolving the issue. It is perfectly normal to debug and fix issues as we go forward.
Anyway, since Mathieu is the one who made the fix, I'm assuming Shi is not familiar with the code he committed (and neither am I). The reason could be that we did not take our time in reviewing and confirming this code. Unless Shi can explain and defend his earlier and current patch instead of relying on Mathieu, I would recommend reviewing all the work that was done here properly. I would like to think that a committer is responsible for his/her commits, and not merely copying someone else's work.
> Add method attribute to request-map to controll a uri can be called GET or POST only
> ------------------------------------------------------------------------------------
>
> Key: OFBIZ-10438
> URL:
https://issues.apache.org/jira/browse/OFBIZ-10438> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: Trunk
> Reporter: Shi Jinghai
> Assignee: Shi Jinghai
> Priority: Minor
> Fix For: Trunk
>
> Attachments: OFBIZ-10438_0001-Add-optional-method-attribute-in-request.patch, OFBIZ-10438_0002-Parse-controller-config-in-one-place.patch, OFBIZ-10438_0003-Handle-multiple-request-methods.patch, OFBIZ-10438_Fix-resolveURI.patch, URL-Error-SelectShipping.png, URL-Error-additem.png
>
>
> 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:
>
> {code:java}
> <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>
> {code}
> The difference is that we DON'T support method list expression:
> {code:java}
> <request-map uri="examples" method="get,post">...</request-map>
> {code}
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)