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

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

Hi Ronny,

could you please check if you end up in the createResponse method of the 
ODataServlet after your DeleteProcessor was called? We do not set a 
content-length header if there is no body which should be the case for a 204 
response.

My first impression would be that for some reason WildFly is answering with a 
response of its own instead of using the servlet response that we fill up.

Also if you have full access to the server and service maybe you could enable 
the debug output and send us this output for your specific request. The 
tutorial can be found here: 
http://olingo.apache.org/doc/odata2/tutorials/debug.html

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

Reply via email to