文档

0044-00000001

更新时间:

问题描述

PutLiveChannel请求Description字段过长。

问题原因

您发起了PutLiveChannel请求来创建一个LiveChannel,但是请求体XML中Description字段长度超出了接口限制。该字段用于表示LiveChannel的描述信息,最长128字节。

问题示例

比如您发起了如下请求:

PUT /test-channel?live HTTP/1.1
Date: Wed, 24 Aug 2016 11:11:28 GMT
Content-Length: xxx
Host: test-bucket.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS YJjHK****:hvwOZJRh8toAj3DZvtsuPgf+a****
<?xml version="1.0" encoding="utf-8"?>
<LiveChannelConfiguration>
    <Description>
    	aaa...(此处省略200个字符)...aaa
    </Description>
    <Status>enabled</Status>
    <Target>
        <Type>HLS</Type>
        <FragDuration>2</FragDuration>
        <FragCount>3</FragCount>
    </Target>
    <Snapshot>
        <RoleName>role_for_snapshot</RoleName>
        <DestBucket>snapshotdest</DestBucket>
        <NotifyTopic>snapshotnotify</NotifyTopic>
        <Interval>1</Interval>
     </Snapshot>
</LiveChannelConfiguration

上述请求中Description节点的值长度超出了接口限制的128个字节,所以接口返回该错误。

解决方案

请确保请求体XML中Description标签的节点值长度符合接口要求,比如:

PUT /test-channel?live HTTP/1.1
Date: Wed, 24 Aug 2016 11:11:28 GMT
Content-Length: xxx
Host: test-bucket.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS YJjHK****:hvwOZJRh8toAj3DZvtsuPgf+a****
<?xml version="1.0" encoding="utf-8"?>
<LiveChannelConfiguration>
    <Description>
    	Channel for test
    </Description>
    <Status>enabled</Status>
    <Target>
        <Type>HLS</Type>
        <FragDuration>2</FragDuration>
        <FragCount>3</FragCount>
    </Target>
    <Snapshot>
        <RoleName>role_for_snapshot</RoleName>
        <DestBucket>snapshotdest</DestBucket>
        <NotifyTopic>snapshotnotify</NotifyTopic>
        <Interval>1</Interval>
     </Snapshot>
</LiveChannelConfiguration

相关文档

  • 本页导读 (1)
文档反馈