YouTube/GData API 响应"Missing start boundary"



尝试使用Java客户端/api上传到YouTube时出现错误。我有一段时间没有测试它了,但是它还在工作,所以我不确定是什么原因导致它停止了。

据我所知,一切看起来都很好,但当我尝试上传新视频时,YouTube不断响应"Missing start boundary"。

我真的不知道是什么原因引起的。我最终通过一个代理来捕获这些信息,希望它能帮助我弄清楚为什么我得到这个。

请求……

POST /feeds/api/users/default/uploads HTTP/1.1
Content-Type: multipart/related;boundary="----=_Part_2_1952419521.1368370735234"
Authorization: GoogleLogin auth=<removed>
User-Agent: service-test YouTube-Java/1.0 GData-Java/1.47.1(gzip)
X-GData-Key: key=<removed>
X-GData-Client: service-test
Slug: Screen.Recording.m4v
Accept-Encoding: gzip
GData-Version: 2.0
Cache-Control: no-cache
Pragma: no-cache
Host: gdata.youtube.com
Accept: text/html, image/gif, image/jpeg, *; q=.2
Transfer-Encoding: chunked
------=_Part_2_1952419521.1368370735234
Content-Type: application/atom+xml
<?xml version='1.0' encoding='UTF-8'?><entry xmlns='http://www.w3.org/2005/Atom' xmlns:gml='http://www.opengis.net/gml' xmlns:georss='http://www.georss.org/georss' xmlns:media='http://search.yahoo.com/mrss/' xmlns:batch='http://schemas.google.com/gdata/batch' xmlns:yt='http://gdata.youtube.com/schemas/2007' xmlns:gd='http://schemas.google.com/g/2005'><app:control xmlns:app='http://www.w3.org/2007/app'><app:draft>yes</app:draft><yt:incomplete/></app:control><atom:category xmlns:atom='http://www.w3.org/2005/Atom' scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#video'/><atom:content xmlns:atom='http://www.w3.org/2005/Atom' type='video/mp4'/><media:group><media:title type='plain'>Screen.Recording.m4v</media:title></media:group><yt:accessControl permission='denied' action='list'/></entry>
------=_Part_2_1952419521.1368370735234
Content-Type: video/mp4
<removed video content>
------=_Part_2_1952419521.1368370735234--

和响应…

HTTP/1.1 400 Bad Request
X-GData-User-Country: US
Content-Type: application/vnd.google.gdata.error+xml
Content-Encoding: gzip
Transfer-Encoding: chunked
Date: Sun, 12 May 2013 14:58:55 GMT
Expires: Sun, 12 May 2013 14:58:55 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
<errors xmlns="http://schemas.google.com/g/2005">
    <error>
        <domain>GData</domain>
        <code>InvalidEntryException</code>
        <internalReason>Missing start boundary</internalReason>
    </error>
</errors>

没有人会遇到这个问题,但只是为了子孙后代,并帮助其他人,如果他们像我一样愚蠢,遇到这个问题。我上错网址了。路径是对的,但我上传到错误的域名。上传的域与其他所有gdata调用不同。

uploads.gdata.youtube.com
不是

gdata.youtube.com

相关内容

  • 没有找到相关文章

最新更新