You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Christian Amend (JIRA)" <ji...@apache.org> on 2015/09/25 15:12:04 UTC

[jira] [Commented] (OLINGO-760) DELETE request through ODataServlet does never finish

    [ https://issues.apache.org/jira/browse/OLINGO-760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14908007#comment-14908007 ] 

Christian Amend commented on OLINGO-760:
----------------------------------------

Hi Ronny,

Sorry for my late reply I got held up at work.

I installed a WildFly 8.2.1 instace on my latptop and used eclipse to manage it with the JBoss tools which can be found in the eclipse marketplace. Then I deployed the ReferenceScenario which we also use in our integration tests. 
For the scenario everything works fine. Even the DELETE case. So my suspicion is that in case of a DELETE you keep some sort of state in your application which prevents any further access afterwards. Could you please chack that?

If this is not the case you could try to use the CXF servlet and see if the issue still persists. We do recommend to use the Java Servlet but in this case it is worth a try.

Let me know how it went.

Best Regards.
Christian

> DELETE request through ODataServlet does never finish
> -----------------------------------------------------
>
>                 Key: OLINGO-760
>                 URL: https://issues.apache.org/jira/browse/OLINGO-760
>             Project: Olingo
>          Issue Type: Bug
>    Affects Versions: V2 2.0.4
>         Environment: WildFly 9.0.1 final
>            Reporter: Ronny Bremer
>            Assignee: Christian Amend
>
> I am using the ODataServlet, which extends HttpServlet and overrides "service" to handle the various OData requests.
> All GET/PUT/PATCH/MERGE operations work flawlessly, however, when it comes to DELETE we observe the following behaviour:
> Client sends a delete request to the servlet, like this:
> DELETE /myear/OData2Service.svc/Tests('124') HTTP/1.1
> Host: loaclhost:8080
> Connection: keep-alive
> Accept: application/json, text/javascript, */*; q=0.01
> User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36
> Content-Type: application/json
> Accept-Encoding: gzip, deflate, sdch
> Accept-Language: en-US,de;q=0.8,en-US;q=0.6,en;q=0.4
> WildFly dispatches the request to our ODataServlet and it processes it inside the "service" method. Eventually my deleteEntity handler gets called and I do the magic in my data model.
> According to the OData v2 standard I should return 204 (NO_CONTENT) on success, so my final line of code looks like:
> return ODataResponse.status(HttpStatusCodes.NO_CONTENT).build();
> which will return control to the ODataServlet.
> At that moment WildFly is answering to the client with the following headers:
> HTTP/1.1 204 No Content
> DataServiceVersion: 2.0
> X-Powered-By: Undertow/1
> Server: WildFly/9
> Date: Thu, 13 Aug 2015 08:09:09 GMT
> Connection: keep-alive
> Content-Length: 0
> So everything seems in order. But somehow the server has not fully handled the request, because any other request following on that connection will just "hang". So I can send new requests to WildFly but they will never get passed into the ODataServlet.service method.
> To me this might be a bug inside the "service" method of the ODataServlet, possibly not returning the right info or enough info for WildFly to return control back to the client.
> BTW: it doesn't matter if the next request is valid or not, even just putting in "garbage" (which should lead to an "HTTP/1.1 400 Bad Request" answer, will be ignored by WildFly.
> Is there any way to track this down further?
> Thank you for your time,
> Ronny
> Edit: The usage of the term "my ODataServlet" might be confusing, I am using the original ODataServlet class from the OLingo library.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)