google 通过可恢复上传请求驱动失败返回错误代码 12156.if 有人知道这个请回复?
google Drive via Resumable upload Request fails returning error code 12156.if any one know about this please reply?
在 windows-10 上,通过可恢复上传请求将文件上传到 google 驱动器时失败。
WinhttpReceiveResponce() 失败,代码为 return 12156。
是的,找到答案了。在 windows 10 WinhttpReceiveResponce() 函数不必要的失败 returning 12156 ERROR_WINHTTP_REDIRECT_FAILED(即 Windows 更改策略或所有尝试都失败(5))。
因此 windows 10,如果块数据上传到 google 驱动器,请不要检查 WinhttpReceiveResponce() 的 return 值。去啊。所以当我跳过 return 值时,文件就成功上传了。
所以我把改变政策的意思是 windows 改变它的政策 windows 10 以防请求服务器不知道它的对错。
2 年后这个问题仍然存在,我 运行 使用 C++ REST SDK 遇到了同样的问题。
如 Google 驱动器 REST API 所述:
A 308 Resume Incomplete
response indicates that you need to continue
uploading the file.
但是当 Windows 10 或 Windows Server 2016 遇到 HTTP 响应代码 308 时,它会出于某种原因引发 WinHTTP 错误 12156 (ERROR_WINHTTP_REDIRECT_FAILED
)。
因此,使用可续传上传时,您应该将 ERROR_WINHTTP_REDIRECT_FAILED
视为 308 Resume Incomplete
,而 运行 在 Windows 10 和 Windows Server 2016 上。
在 windows-10 上,通过可恢复上传请求将文件上传到 google 驱动器时失败。 WinhttpReceiveResponce() 失败,代码为 return 12156。
是的,找到答案了。在 windows 10 WinhttpReceiveResponce() 函数不必要的失败 returning 12156 ERROR_WINHTTP_REDIRECT_FAILED(即 Windows 更改策略或所有尝试都失败(5))。
因此 windows 10,如果块数据上传到 google 驱动器,请不要检查 WinhttpReceiveResponce() 的 return 值。去啊。所以当我跳过 return 值时,文件就成功上传了。
所以我把改变政策的意思是 windows 改变它的政策 windows 10 以防请求服务器不知道它的对错。
2 年后这个问题仍然存在,我 运行 使用 C++ REST SDK 遇到了同样的问题。
如 Google 驱动器 REST API 所述:
A
308 Resume Incomplete
response indicates that you need to continue uploading the file.
但是当 Windows 10 或 Windows Server 2016 遇到 HTTP 响应代码 308 时,它会出于某种原因引发 WinHTTP 错误 12156 (ERROR_WINHTTP_REDIRECT_FAILED
)。
因此,使用可续传上传时,您应该将 ERROR_WINHTTP_REDIRECT_FAILED
视为 308 Resume Incomplete
,而 运行 在 Windows 10 和 Windows Server 2016 上。