QuickBlox删除对话框返回拒绝访问

时间:2015-08-08 13:15:59

标签: quickblox

我使用Jersey编写了一个帮助程序来删除QuickBlox上的对话框。由于某种原因,curl生成的相同删除请求返回时没有任何错误但是Jersey(一个java restful客户端库)返回403.以下是请求和响应的数据包跟踪(在wireshark上获取):

泽西岛请求:

DELETE /chat/Dialog/55c5fab8535c12a211000d0f.json HTTP/1.1\r\n
Accept: */*\r\n
QB-Token: 32a7acd55d3b21dad79afba3b834a0b62c9a4946\r\n
User-Agent: Jersey/2.19 (HttpUrlConnection 1.8.0_20)\r\n
Host: api.quickblox.com\r\n
Connection: keep-alive\r\n
\r\n

泽西岛回应:

Hypertext Transfer Protocol
HTTP/1.1 403 Access Denied\r\n
Date: Sat, 08 Aug 2015 12:49:14 GMT\r\n
Connection: keep-alive\r\n
Cache-Control: no-store\r\n
Content-Type: text/html\r\n
Content-Language: en\r\n
Content-Length: 249\r\n
\r\n
[HTTP response 2/2]
[Time since request: 0.009155000 seconds]
[Prev request in frame: 24303]
[Prev response in frame: 24324]
[Request in frame: 24328]
Line-based text data: text/html
<HTML>\n
<HEAD>\n
<TITLE>Access Denied</TITLE>\n
</HEAD>\n
\n
<BODY BGCOLOR="white" FGCOLOR="black">\n
<H1>Access Denied</H1>\n
<HR>\n
\n
<FONT FACE="Helvetica,Arial"><B>\n
Description: You are not allowed to access the document you requested.\n
</B></FONT>\n
<HR>\n
</BODY>\n

卷曲请求:

Hypertext Transfer Protocol
DELETE /chat/Dialog/55c5fab8535c12a211000d0f.json HTTP/1.1\r\n
User-Agent: curl/7.37.1\r\n
Host: api.quickblox.com\r\n
Accept: */*\r\n
QB-Token: 32a7acd55d3b21dad79afba3b834a0b62c9a4946\r\n
\r\n
[Full request URI:     http://api.quickblox.com/chat/Dialog/55c5fab8535c12a211000d0f.json]
[HTTP request 1/1]
[Response in frame: 35345]

卷曲响应:

Hypertext Transfer Protocol
HTTP/1.1 200 OK\r\n
Access-Control-Allow-Origin: *\r\n
Cache-Control: max-age=0, private, must-revalidate\r\n
Content-Type: application/json; charset=utf-8\r\n
Date: Sat, 08 Aug 2015 12:54:34 GMT\r\n
ETag: "7215ee9c7d9dc229d2921a40e899ec5f"\r\n
QB-Token-ExpirationDate: 2015-08-08 14:49:14 UTC\r\n
QuickBlox-REST-API-Version: 0.1.1\r\n
Server: nginx/1.0.15\r\n
Status: 200 OK\r\n
X-Rack-Cache: invalidate, pass\r\n
X-Request-Id: 129dfcd4199bcae1f61cbd55a435885d\r\n
X-Runtime: 0.036879\r\n
X-UA-Compatible: IE=Edge,chrome=1\r\n
Content-Length: 1\r\n
Connection: keep-alive\r\n
\r\n
[HTTP response 1/1]
[Time since request: 0.475311000 seconds]
[Request in frame: 35287]
JavaScript Object Notation: application/json
Line-based text data: application/json

有没有人知道这里发生了什么?

0 个答案:

没有答案