Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为类创建代理服务器,目前正在解析客户端请求。当我收到一个 POST 请求时,我如何知道标头的结束位置和内容的开始位置?是否有一个总是最后出现的标题?
它应该在空行之后(CRLF = 回车,换行,即空行)。在最后一个标题之后应该有两个,一个转到下一行,另一个创建一个空白行。然后内容将开始。
POST /enlighten/rest HTTP/1.1 Host: api.opencalais.com Content-Type: application/x-www-form-urlencoded Content-Length: length licenseID=string&content=string&/paramsXML=string
来自:http ://www.opencalais.com/HTTPexamples