开发者

ASIHTTPRequest - Exclude charset from Content-Type header

I'm using ASIHTTPRequest to do a file upload.

How can I remove the charset from Content-Type header?

So it will look like this

Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryH7RS1ABXkiKv7HSp

And not

Content-Type: multipart/form-data; charset=iso-8859-1; boundary=----WebKitFormBoundaryH7R开发者_开发问答S1ABXkiKv7HSp

That charset is causing the server to throw a 400 error.

Right now I have it working by removing it from the ASIHTTPrequest codebase itself, but wondering if there is a cleaner way to do that.

Thank you,

Tee


The current code seems to always add a charset part.

Perhaps there's a value you can set the charset to that the server will accept?


I have same issue. Here is what I have found: link

See the last answer on that thread. You can find there how to remove "charset" from the header.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜