Commit 22a6b78f authored by jan.koester's avatar jan.koester
Browse files

some fiex

parent c095884d
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ size_t libhttppp::HttpRequest::parse(){
        for(size_t i=0; i<RecvData.size(); ++i){
            for(size_t ii=0; ii<=wsize; ++ii){
                if(ii==wsize){
                    return ii;
                    return i-wsize;
                }
                if(RecvData[i]==word[ii]){
                    ++i;
@@ -490,6 +490,7 @@ size_t libhttppp::HttpRequest::parse(){
            std::copy(RecvData.begin()+startpos,RecvData.begin()+endpos,
                      std::inserter<std::vector<char>>(header,header.begin()));

            endpos+=4;
            bool found=false;
            int pos=0;

@@ -573,8 +574,9 @@ size_t libhttppp::HttpRequest::parse(){
                }

            }
            std::move(RecvData.begin()+header.size(),RecvData.end(),RecvData.begin());
            RecvData.shrink_to_fit();

            std::move(RecvData.begin()+endpos,RecvData.end(),RecvData.begin());
            RecvData.resize(RecvData.size()-endpos);
        }else{
            excep[HTTPException::Note] << "No Incoming data in queue";
            throw excep;
+0 −2
Original line number Diff line number Diff line
@@ -75,8 +75,6 @@ void libhttppp::HttpEvent::RequestEvent(netplus::con* curcon){
        re[netplus::NetException::Error] << "http error:" << e.what();
        throw re;
    }
    std::move(curcon->RecvData.begin()+size,curcon->RecvData.end(),curcon->RecvData.begin());
    curcon->RecvData.resize(curcon->RecvData.size()-size);
}

void libhttppp::HttpEvent::ResponseEvent(netplus::con* curcon){