-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.0] 下载永久素材时,微信返回的Content-Type不正确,导致出错。 #290
Comments
在我发布新版之前你可以先按我的代码变更修改用着 |
而且下载下来的音频是压缩过的,完全不能放。 |
@hareluya 这... |
微信确实太操蛋,不仅不给文件名,还连正确content type 都不给。 @hareluya 视频给链接其实是一个页面,真要下载只有自己解析内容,抓取了。。。。 |
overtrue
added a commit
that referenced
this issue
Feb 19, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
刚发现微信接口在下载永久素材时(素材类型为video, image, voice)的,用get($mediaId)方法下载时服务器返回的Content-Type居然是
Content-Type: text/plain
。这样导致Material.php里的get($mediaId)方法无法返回整个request body。而是开始parseJSON。而parseJSON返回的结果是
false
,所以在checkAndThrow就出错了。不知道这个获取永久素材时的content-type不正确是我的个别现象还是普遍现象。
The text was updated successfully, but these errors were encountered: