开发者

CFHTTPMessageCopyBody returns the header

I am testing the product on the new osx 10.7 preview. First, we found a开发者_开发知识库 problem CFHTTPMessageCopyBody is not happy with the message which header is not complete. To make 10.7 happy, we basically use the approach:

create an empty message, call CFHTTPMessageAppendBytes append the response header, call CFHTTPMessageAppendBytes append the http body, call CFHTTPMessageCopyBody to get the body without header.

But, to our surprise, CFHTTPMessageCopyBody actually returns the header after the body. The problem happens to all 10.5, 10.6 and 10.7 platform.

Thanks in advance.

Max


It turns out it was my fault. I accidentally append headers to the message after the header is complete. Thus, the new header becomes a part of body.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜