[
https://issues.apache.org/jira/browse/OLINGO-760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694993#comment-14694993
]
Ronny Bremer commented on OLINGO-760:
-------------------------------------
This is the debug output from the following request (pasted via Telnet to
exclude any possible browser issue):
DELETE /myeardispatcher/OData2Service.svc/Tests('3')?odata-debug=json HTTP/1.1
Host: localhost: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: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
Debug output:
HTTP/1.1 200 OK
X-Powered-By: Undertow/1
Server: WildFly/9
Date: Thu, 13 Aug 2015 09:50:54 GMT
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Content-Length: 2492
{"request":{"method":"DELETE","uri":"http://localhost:8080/myeardispatcher/OData2Service.svc/Tests('3')?odata-debug=json","protocol":"HTTP/1.1","headers":{"accept-language":"de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4","origin":"http://localhost","host":"localhost:8080","host":"localhost:8080","host":"localhost:8080","connection":"keep-alive","connection":"keep-alive","connection":"keep-alive","content-type":"application/json","content-type":"application/json","content-type":"application/json","accept-encoding":"gzip,
deflate, sdch","accept-encoding":"gzip, deflate,
sdch","accept":"application/json, text/javascript, */*;
q=0.01","accept":"application/json, text/javascript, */*;
q=0.01","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","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","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"}},"response":{"status":{"code":204,"info":"No
Content"},"headers":{"DataServiceVersion":"2.0"}},"server":{"version":"2.0.4","environment":{"localAddr":"127.0.0.1","localName":"127.0.0.1","localPort":"8080","pathInfo":"/Tests('3')","pathTranslated":"/opt/myear/wildfly-9.0.1.Final/standalone/tmp/vfs/deployment/deployment24a616a2a3aefe1e/myeardispatcher.war-c7848e8b72e0e1ec/Tests('3')","remoteAddr":"127.0.0.10","remoteHost":"127.0.0.1","remotePort":"64608","scheme":"http","serverName":"localhost","serverPort":"8080","servletPath":"/OData2Service.svc"},"runtime":[{"class":"ODataRequestHandler","method":"handle","duration":{"value":50452,"unit":"µs"},"children":[{"class":"UriParserImpl","method":"parse","duration":{"value":248,"unit":"µs"}},{"class":"Dispatcher","method":"dispatch","duration":{"value":49756,"unit":"µs"}}]}]}}
> 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)