You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Ronny Bremer (JIRA)" <ji...@apache.org> on 2015/08/13 10:16:45 UTC

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

     [ https://issues.apache.org/jira/browse/OLINGO-760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ronny Bremer updated OLINGO-760:
--------------------------------
    Description: 
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.

  was:
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


> 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
>
> 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)