[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-28 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16595214#comment-16595214
 ] 

Jacques Le Roux commented on OFBIZ-10438:
-

Thanks Mathieu,

I confirm this issue is fixed with [^OFBIZ-10438_Fix-resolveURI.patch]. The 
problem was r1838081 prevented to serialise requests.

Like in ordermgr/control/updateCheckoutOptions/quickcheckout where 
updateCheckoutOptions and quickcheckout are serialised to update the check out 
after updateCheckoutOptions is done and then get back to the screen with 
quickcheckout.

CheckoutOptions.ftl is a good example of this usage.

I'm not sure if the best way to describe this feature is to say that the view 
is overridden as you comment in your patch. I would rather say that the views 
are serialised. But that's OK with me, it makes also sense, and I don't want to 
be nitpicky today :)

I committed at revision: 1839451  


> 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: Jacques Le Roux
>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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-20 Thread Taher Alkhateeb (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-20 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16585803#comment-16585803
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


So I was able to reproduce the bug and fix it in  
[^OFBIZ-10438_Fix-resolveURI.patch] . The problem was caused by a mistake in 
the extraction of the overridden views logic from 
{{org.apache.ofbiz.webapp.control.RequestHandler.doRequest(HttpServletRequest, 
HttpServletResponse, String)}} . Since there are only a few usages of this 
feature I didn't detect it earlier.

Can you confirm, it works properly on your side?

Thanks [~deepak.nigam] for the report.

> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-20 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16585561#comment-16585561
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Hello [~deepak.nigam],
I am looking at the bug you have described.

> 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, 
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-20 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16585460#comment-16585460
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Thank you Deepak!

I can reproduce the error now.

> 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, 
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-19 Thread Deepak Nigam (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16585446#comment-16585446
 ] 

Deepak Nigam commented on OFBIZ-10438:
--

Hi Shi/Rishi,

As discussed on the dev mailing list, I am able to reproduce the issue on the 
local machine (Derby database) also using the SVN trunk code. Here are the 
steps to reproduce it:

1) Log in to the 'ordermgr' with admin/ofbiz credentials.

2) Click on the 'orderentry' menu.

3) Under the 'Sales Order' section provide the details as follows:

    Product Store: OFBiz E-Commerce Store
    Sales Channel: Web Channel
    User Login Id: admin
    Customer: Demo Customer

4) Click on the 'Continue' button on the top right on the section.

5) Leave the details on next page as it is and click on the 'Continue'.

6) Select the product 'WG-9943' and enter any quantity (say 1). Click on the 
'Add To Cart' button.

7) On the next page select Color, Size and Unit of Measure. Click on 'Add To 
Cart' button again.

8) You will be landed to an error page saying: "
|{color:#ff}*:ERROR MESSAGE:*{color}|
|org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request 
[additem]; this request does not exist or cannot be called directly.|

"

Please find the attached image 'URL-Error-additem.png' for your reference.

9) Now change the product to 'GZ-2644' and click on 'Add To Cart' button.

10) Click on the 'Quick Finalize Order' link on the top right corner.

11) Click on the radio button for selecting the shipping address.

12) You will be landed to an error page saying: "
|{color:#ff}*:ERROR MESSAGE:*{color}|
|org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request 
[updateCheckoutOptions]; this request does not exist or cannot be called 
directly.|

"

Please find the attached image "URL-Error-SelectShipping.png" for your 
reference.

 

It might be possible that demo instance is not up-to-date with the latest code 
base and we are not able to regenerate it there. 

 

 

 

 

 

> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-16 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16582339#comment-16582339
 ] 

Jacques Le Roux commented on OFBIZ-10438:
-

Yes Taher, Michael,

That's what/why I waited :)

Thanks for suggestion Pierre

> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-16 Thread Pierre Smits (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16582328#comment-16582328
 ] 

Pierre Smits commented on OFBIZ-10438:
--

One way to address such predicaments is to set a label, e.g. discussion, and 
have a generally available filter on tickets being discussed on the dev ml.

> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-16 Thread Michael Brohl (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16582320#comment-16582320
 ] 

Michael Brohl commented on OFBIZ-10438:
---

+1, Taher.

I did not recognize that this had an open discussion.

So I am going to ask for a revert, [~shi.jinghai]. The review/discussion should 
be finalized before the commit.

And please, let us be a bit more sensitive on commits and discussions.

===

btw, it could be helpful if we had some kind of marker for an issue which 
prevents closing it and clearly shows that there is no final decision on a 
commit. Not sure how we can do it right now.

> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-16 Thread Taher Alkhateeb (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16582305#comment-16582305
 ] 

Taher Alkhateeb commented on OFBIZ-10438:
-

As I mentioned elsewhere, I did not complete my review of the code nor was the 
discussion thread concluded. And given Shi himself lost interest after the 
revert I am surprised he rushed another commit.Quite unfortunate.

I am not going to ask for another revert, but I would like to express my 
frustration with this process. Again community decisions are important and I 
don't see smooth cooperation happening here.

> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-16 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16582243#comment-16582243
 ] 

Jacques Le Roux commented on OFBIZ-10438:
-

Thanks Michael, you beaten me on it :)

> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-16 Thread Michael Brohl (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16582161#comment-16582161
 ] 

Michael Brohl commented on OFBIZ-10438:
---

[~shi.jinghai],

thanks for your commit.

Can you please specify the correct "Fix versions" and the corresponding 
revision in a comment when you close an issue?

Same applies to OFBIZ-10443.

Thanks!

> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-09 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16574379#comment-16574379
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Hello [~taher],

Makes sense, please go ahead. :)

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-09 Thread Taher Alkhateeb (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16574373#comment-16574373
 ] 

Taher Alkhateeb commented on OFBIZ-10438:
-

Hi Mathieu,

The thread you mentioned does not explain the proposal, and jumps directly to 
the patches. I think we need to discuss the strategy and direction of what 
we're trying to achieve, and let the community decide, then we can discuss the 
technical details here after we agree on the general direction.

If you are in agreement then I will start the thread.

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-09 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16574370#comment-16574370
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Forgot to say, I use postman plugin in chrome to request the 
https://localhost:8443/webtools/control/ping.

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-08 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16574287#comment-16574287
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Thank you Mathieu! I'm testing these new patches.

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-08 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16572985#comment-16572985
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


I don't mind if you go with this strategy, however it is not clear to me how 
this thread will differ/complement what has already been discussed 
[here|https://lists.apache.org/thread.html/f1729ef5eafcf71adfbed0c3ea61dfb73225dff82abc4a57c3de8ed5@%3Cdev.ofbiz.apache.org%3E].

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-08 Thread Taher Alkhateeb (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16572952#comment-16572952
 ] 

Taher Alkhateeb commented on OFBIZ-10438:
-

Great, I think the first step is to get community consensus on the design 
strategy. I would suggest that I start a thread to explain what is going on, 
try to explain the situation as best as I can, and then you can also provide 
your input and we see how the community reacts. Do you like that approach? May 
I proceed? Or would you like to kick-start the discussion yourself?

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-08 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16572942#comment-16572942
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


{quote}
Can I bother you to refresh my memory? What are we going to do here? Just a 
brief of what you want to do?
{quote}

To summarize this patch series is about adding support for the "method" 
attribute and allowing multiple request maps with the same URI but with 
different method.

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-08 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16572935#comment-16572935
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Since OFBIZ-10485 is closed, I have updated  the patches to [~taher] 
suggestions. In [^OFBIZ-10438_0002-Parse-controller-config-in-one-place.patch]  
the {{Controller}} class has been renamed to {{ControllerConfig}}. Additionally 
in [^OFBIZ-10438_0003-Handle-multiple-request-methods.patch]  does not depend 
on {{MultivaluedMap}} anymore, the adapter anonymous class used in 
{{getRequestMapMap}} is now a proper class, and more tests has been added.

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-08-08 Thread Taher Alkhateeb (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16572932#comment-16572932
 ] 

Taher Alkhateeb commented on OFBIZ-10438:
-

Hi Mathieu,

Can I bother you to refresh my memory? What are we going to do here? Just a 
brief of what you want to do?

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-07-23 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16552431#comment-16552431
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Seems reasonable. I will rebase the patches after 
[OFBIZ-10485|https://issues.apache.org/jira/browse/OFBIZ-10485] is closed.

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-07-22 Thread Taher Alkhateeb (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16552003#comment-16552003
 ] 

Taher Alkhateeb commented on OFBIZ-10438:
-

Hello Mathieu,

Are we stopping our work here until we complete our work in OFBIZ-10485? If 
yes, then I'll focus my efforts over there and you can alert me here when you 
want to.

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-07-12 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16541575#comment-16541575
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


I have updated the [^OFBIZ-10438_0003-Handle-multiple-request-methods.patch] to 
separate the {{resolveURI}} and {{resolveMethod}} tests in separate inner 
classes.

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-07-06 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16535185#comment-16535185
 ] 

Jacques Le Roux commented on OFBIZ-10438:
-

Hi Jinghai,

You wrote
bq.  whether it would be backported to stable branches in devML.

It's very rare that an improvement is backported, even a very simple one, which 
is not the case here.
Custom projects can backport by themselves if they want/need...

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-07-04 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16532372#comment-16532372
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Following revert of the commit in order to discuss the design change on the 
mailing list, I have updated the patches in order to ease the review process

> 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
> 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
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-28 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526185#comment-16526185
 ] 

Jacques Le Roux commented on OFBIZ-10438:
-

Thanks Mathieu and JInghai for your work (that I have still to review ;))

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch, 
> OFBIZ-10438_0005-Improved-Parse-controller-config-in-one-place.patch, 
> OFBIZ-10438_0006-Improved-Split-resolveURI-in-two-methods.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-27 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16524843#comment-16524843
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


[~shi.jinghai] I agree :-)

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch, 
> OFBIZ-10438_0005-Improved-Parse-controller-config-in-one-place.patch, 
> OFBIZ-10438_0006-Improved-Split-resolveURI-in-two-methods.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-27 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16524833#comment-16524833
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Thank you Nicolas!

If Mathieu agree, let's stop here, I'm very happy what Mathieu has done. Great.

Let's discuss whether this improvement is acceptable, whether it would be 
backported to stable branches in devML.

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch, 
> OFBIZ-10438_0005-Improved-Parse-controller-config-in-one-place.patch, 
> OFBIZ-10438_0006-Improved-Split-resolveURI-in-two-methods.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-27 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16524831#comment-16524831
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


{quote}And method="" and method="all" are OK. I insist to support method="" as 
according to the xsd, it's allowed and should be parsed as method="all"
{quote}
Would it be OK with you to only support {{method=""}}?

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch, 
> OFBIZ-10438_0005-Improved-Parse-controller-config-in-one-place.patch, 
> OFBIZ-10438_0006-Improved-Split-resolveURI-in-two-methods.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-26 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16524609#comment-16524609
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Hi Mathieu,

Your new patches are in rev. 1834465.

I tested them and all 3 cases listed above are OK.

And method="" and method="all" are OK. I insist to support method="" as 
according to the xsd, it's allowed and should be parsed as method="all".  

I'm happy you returned to doGet/doPost, I guess you read this tomcat document 
(the service method tortured me for a while)

https://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/http/HttpServlet.html

 
{code:java}
...
There's almost no reason to override the service method. service handles 
standard HTTP requests by dispatching them to the handler methods for each HTTP 
request type (the doXXX methods listed above).
...{code}
I have to say, you're very sensitive and smart. My last beg, could you remove 
the java.util.Optional(since JDK 1.8) to make the patches can be backported to 
OFBiz 14.07?

Kind Regards,

 

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch, 
> OFBIZ-10438_0005-Improved-Parse-controller-config-in-one-place.patch, 
> OFBIZ-10438_0006-Improved-Split-resolveURI-in-two-methods.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-26 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16524442#comment-16524442
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Thank you Mathieu!

Let me test your new patches now.

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch, 
> OFBIZ-10438_0005-Improved-Parse-controller-config-in-one-place.patch, 
> OFBIZ-10438_0006-Improved-Split-resolveURI-in-two-methods.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-26 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16524296#comment-16524296
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Here are two patches for the refactoring 
([^OFBIZ-10438_0005-Improved-Parse-controller-config-in-one-place.patch], 
[^OFBIZ-10438_0006-Improved-Split-resolveURI-in-two-methods.patch])

A few comments:
 - I reverted the use of the {{service}} method since you prefer to narrow to 
only {{GET}} and {{POST}} methods.
 - {{resolveURI}} has been splitted to separate the resolution of the uri and 
the resolution of method
 - {{resolveURI}} now integrates the logic regarding the override view uri.
 - I have used a new exception type to handle the special error handling for 
method not supported however I am not sure about the strategy unconditionally 
not using the default error page
 - I have removed the stream based implementation of {{resolveMethod}} which 
was a bit tricky to understand.
 - I have adapted the error message to not include the supported method (but 
not the translation). The reason is that IMO the {{OPTIONS}} method should be 
used for getting that information instead.
 - I am not sure we should support both "all" and "" to refer to the whole set 
of methods. it would be simpler to have only one choice. I don't have any 
preference.

It is possible that I overlooked some of the tests you described above, so tell 
me if that's the case.

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch, 
> OFBIZ-10438_0005-Improved-Parse-controller-config-in-one-place.patch, 
> OFBIZ-10438_0006-Improved-Split-resolveURI-in-two-methods.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-26 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16523370#comment-16523370
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Hi Jacques,

Thanks!

Sure, I'll start a thread after Mathieu submit the refactoring patch.

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-26 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16523359#comment-16523359
 ] 

Jacques Le Roux commented on OFBIZ-10438:
-

Hi Jinghai,

Backporting an improvement needs to be discussed on the dev ML first, thanks.

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-26 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16523353#comment-16523353
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Ok make more sense. I was confuse by “backporting to JDK ≥ 1.8” which I guess 
should have been “backporting to JDK < 1.8”.

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-26 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16523334#comment-16523334
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

On the refactoring, YES please.

On the backport, simple, the java.util.stream interfaces are supported since 
JDK 1.8, so the implement can be merged into OFBiz 16.11 and 17.12. That's what 
I mean. :)

Kind Regards,

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-26 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16523318#comment-16523318
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Great, thanks for working on it!

If that's OK with you, I would like to do some refactoring before closing this 
issue.  The reason is that AIUI {{resolveURI}} and  {{matchRequestMethod}} 
responsibilities overlap a bit. ;-)

{quote}I'll backport it to other versions JDK >= 1.8{quote}

What do you mean?

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-25 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16523079#comment-16523079
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Hi Mathieu,

I submitted your patches in rev. 1834389. I made 3 small changes:
 # Added a matchRequestMethod method in service of ControlServlet.java to check 
whether the method configured in request-map matches the HttpServletRequest 
method.
 # Added support method="" same as method="all".
 # Narrowed the methods supported to GET or POST only as the original 
ControlServlet did.

If you check my modifications ok, I'll backport it to other versions JDK >= 1.8 
and close this issue.

Appreciate your help. Well done!

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-22 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520070#comment-16520070
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Thanks for the feedback, I am looking into it.

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-22 Thread Shi Jinghai (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16520061#comment-16520061
 ] 

Shi Jinghai commented on OFBIZ-10438:
-

Hi Mathieu,

Amazing to see your patches, great work!

While I tested them in the following 3 cases, case 1 is OK, case 2 and 3 are 
not OK:

*CASE 1*: Loading and parsing speed of controller.xml:

The loading and parsing speeds with or without your patch in my local 
environment are same.

 

*CASE 2*: Error message when method not match:
 a. edit framework/webtools/webapp/webtools/WEB-INF/controller.xml, add 
method="post" to ping uri
{code:java}





{code}
b. visit [https://localhost:8443/webtools/control/ping] in browser
 c. error message:
{code:java}
org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request 
[ping]; this request does not exist or cannot be called directly.{code}
 

*CASE 3*: Without /control in uri (when we build openapi, we hope the uri can 
be as clean as possible):
 a. edit framework/webtools/webapp/webtools/WEB-INF/web.xml:
{code:java}
// add /ping to allowedPaths

allowedPaths

/ping:/ping.txt:/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp


// change ControlServlet from /control/* to /*

ControlServlet
/*

{code}
b. edit framework/webtools/webapp/webtools/WEB-INF/controller.xml, remove 
method="post" from ping uri

c. visit [https://localhost:8443/webtools/ping] in browser

d. PONG is displayed correctly

e. edit framework/webtools/webapp/webtools/WEB-INF/controller.xml, add 
method="post" to ping uri

f. visit [https://localhost:8443/webtools/ping] in browser

g. error message:
{code:java}
ERROR in error page, (infinite loop or error page not found with name 
[/error/error.jsp]), but here is the text just in case it helps you: 
org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request 
[ping]; this request does not exist or cannot be called directly.
{code}
Maybe case 3 is out of scope of this issue, you can ignore it.

 

Kind Regards,

> 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
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (OFBIZ-10438) Add method attribute to request-map to controll a uri can be called GET or POST only

2018-06-20 Thread Mathieu Lirzin (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16518592#comment-16518592
 ] 

Mathieu Lirzin commented on OFBIZ-10438:


Hello Shi,

Having a {{method}} attribute has the advantage or requiring minimal changes in 
the XML grammar even if it can involve some redundancy. I have included a set 
of patches implementing the support of alternative HTTP methods and the 
dispatch to the request-map with the corresponding {{method}} attribute.

> 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
>Priority: Minor
> Attachments: 
> OFBIZ-10438_0001-Improved-Add-ControlServlet-service-method.patch, 
> OFBIZ-10438_0002-Improved-Add-optional-method-attribute-in-request-ma.patch, 
> OFBIZ-10438_0003-Improved-Factorize-default-request-search-in-Request.patch, 
> OFBIZ-10438_0004-Improved-Add-RequestHandler-resolveURI-method.patch
>
>
> 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}
> 
>    
>    
>    
>    
> 
> {code}
>  The difference is that we DON'T support method list expression:
> {code:java}
> ...
> {code}
>   
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)