The third-party platform application interface http request of Penguin, the video file fragment upload failed, status code: 302
1. The third-party platform application interface http request of Penguin, the upload of video files shards failed, status code: 302. Print the response object. Time: 2021/10/12
yii\httpclient\Response Object
(
[client] => yii\httpclient\Client Object
(
[baseUrl] => http://api.om.qq.com
[formatters] => Array
(
)
[parsers] => Array
(
)
[requestConfig] => Array
(
)
[responseConfig] => Array
(
)
[contentLoggingMaxSize] => 2000
[_transport:yii\httpclient\Client:private] => yii\httpclient\CurlTransport Object
(
[_events:yii\base\Component:private] => Array
(
)
[_eventWildcards:yii\base\Component:private] => Array
(
)
[_behaviors:yii\base\Component:private] =>
)
[_events:yii\base\Component:private] => Array
(
)
[_eventWildcards:yii\base\Component:private] => Array
(
)
[_behaviors:yii\base\Component:private] => Array
(
)
)
[_headers:yii\httpclient\Message:private] => Array
(
[0] => HTTP/1.1 302 Moved Temporarily
[1] => Server: stgw/1.3.12.4_1.13.5
[2] => Date: Tue, 12 Oct 2021 03:01:13 GMT
[3] => Content-Type: text/html
[4] => Content-Length: 169
[5] => Connection: keep-alive
[6] => Location: https://api.om.qq.com/video/authuploadtrunk?access_token=L3JWJY62NKATAKX4YHE7DA&openid=4a4e3035a68accadc82b91156a9a0821&transaction_id=781312031335346181&start_offset=0
)
[_cookies:yii\httpclient\Message:private] =>
[_content:yii\httpclient\Message:private] =>
302 Found
302 Found
stgw/1.3.12.4_1.13.5
[_data:yii\httpclient\Message:private] =>
[_format:yii\httpclient\Message:private] =>
[_events:yii\base\Component:private] => Array
(
)
[_eventWildcards:yii\base\Component:private] => Array
(
)
[_behaviors:yii\base\Component:private] =>
)
2. Analyze the conclusion, check the information in the response header, http/1.1 302 moved temporarily. followhttp://api.om.qq.com302 Jump tohttps://api.om.qq.com. The HTTP 302 Found redirect status code indicates that the requested resource has been temporarily moved to the URL specified by the HTTP response header location. as shown in Figure 1
3. Check the official interface documentation of Penguin. URL:https://open.om.qq.com/resources/resourcesCenter. Determined to still be the HTTP protocol. as shown in Figure 2
4,http://api.om.qq.com. Decide to set its value:https://api.om.qq.com. Adjusted to the HTTPS protocol.
5. The third-party platform application interface http request of Penguin, the video file sharding is successful, and the status code: 200. Print the response object. It means that after the official interface is adjusted to the HTTPS protocol, the document has not been updated in time. as shown in Figure 3
yii\httpclient\Response Object
(
[client] => yii\httpclient\Client Object
(
[baseUrl] => https://api.om.qq.com
[formatters] => Array
(
)
[parsers] => Array
(
)
[requestConfig] => Array
(
)
[responseConfig] => Array
(
)
[contentLoggingMaxSize] => 2000
[_transport:yii\httpclient\Client:private] => yii\httpclient\CurlTransport Object
(
[_events:yii\base\Component:private] => Array
(
)
[_eventWildcards:yii\base\Component:private] => Array
(
)
[_behaviors:yii\base\Component:private] =>
)
[_events:yii\base\Component:private] => Array
(
)
[_eventWildcards:yii\base\Component:private] => Array
(
)
[_behaviors:yii\base\Component:private] => Array
(
)
)
[_headers:yii\httpclient\Message:private] => Array
(
[0] => HTTP/1.1 100 Continue
[1] => HTTP/1.1 200 OK
[2] => Date: Tue, 12 Oct 2021 03:14:53 GMT
[3] => Content-Type: application/json;charset=UTF-8
[4] => Content-Length: 117
[5] => Connection: keep-alive
[6] => Server: nginx
)
[_cookies:yii\httpclient\Message:private] =>
[_content:yii\httpclient\Message:private] => {"code":0,"data":{"end_offset":10100677,"start_offset":10100677,"transaction_id":781312034678068161},"msg":"SUCCESS"}
[_data:yii\httpclient\Message:private] =>
[_format:yii\httpclient\Message:private] =>
[_events:yii\base\Component:private] => Array
(
)
[_eventWildcards:yii\base\Component:private] => Array
(
)
[_behaviors:yii\base\Component:private] =>
)


