简体   繁体   English

在Objective-C中使用AFNetworking上传图像时出错

[英]Getting error in uploading image with AFNetworking in Objective-C

Getting error in uploading image with AFNetworking in Objective-C:在 Objective-C 中使用 AFNetworking 上传图像时出错:

Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad gateway (502)错误域=com.alamofire.error.serialization.response 代码=-1011“请求失败:网关错误(502)

Take a look at https://en.wikipedia.org/wiki/List_of_HTTP_status_codes看看https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

A 502 error indicates a problem with the server you're trying to upload to, and in particular, with one of its upstream servers. 502 错误表示您尝试上传到的服务器存在问题,特别是其上游服务器之一。 If you're not getting this error on other clients trying to upload to the same URL (eg, a web browser), in my experience the culprit is the gateway server and upstream server not dealing with headers the same way, but your mileage may vary.如果您在尝试上传到相同 URL(例如 Web 浏览器)的其他客户端上没有收到此错误,根据我的经验,罪魁祸首是网关服务器和上游服务器没有以相同的方式处理标头,但您的里程可能会增加各不相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM