http information

来源:互联网 发布:淘宝网宝贝 编辑:程序博客网 时间:2024/06/06 15:36

This is the website for http spec http://www.w3.org/Protocols/

100 continue问题:手机上开发java me http 程序,有时会收到 100 continue, 但是一直没有收到 200 response,

这时你可以读出100 响应的实体内容, 200 response 就在里面。这个问题一般是由手机的软件实现错误引起的。

if(responseCode == 100){
    //open the input stream
    //read the complete data that you get. the 200 OK will be in this message body you can parse it to find the actual message and the response code of 200 OK.
}

An origin server that sends a 100 (Continue) response MUST
       ultimately send a final status code, once the request body is
       received and processed, unless it terminates the transport
       connection prematurely.