Added client mode support to HTTP::Websocket, added websockettest binary, added ws/wss protocol support to HTTP::URL, added support for websockets and socket overriding to HTTP::Downloader, fixed HTTP parser not handling response codes 1XX, 204 and 304 correctly.
This commit is contained in:
parent
57b930020b
commit
37af199a1c
9 changed files with 214 additions and 42 deletions
|
|
@ -629,6 +629,11 @@ bool HTTP::Parser::parse(std::string &HTTPbuffer, Util::DataCallback &cb){
|
|||
}
|
||||
if (seenHeaders){
|
||||
if (headerOnly){return true;}
|
||||
//Check if we have a response code that may never have a body
|
||||
if (url.size() && url[0] >= '0' && url[0] <= '9'){
|
||||
unsigned int code = atoi(url.data());
|
||||
if ((code >= 100 && code < 200) || code == 204 || code == 304){return true;}
|
||||
}
|
||||
if (length > 0 && !getChunks){
|
||||
unsigned int toappend = length - body.length();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue