Commit 8abdd525 authored by jan.koester's avatar jan.koester
Browse files

Merge branch 'master' of git.tuxist.de:jan.koester/libhttppp

parents c1ae8fd7 c940d61e
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1369,8 +1369,11 @@ void libhttppp::HttpCookie::setcookie(HttpResponse *curresp,
void libhttppp::HttpCookie::parse(libhttppp::HttpRequest* curreq){
  HttpHeader::HeaderData *hc = curreq->getData("cookie");

  if(!hc)
    return;
  if(!hc){
        HTTPException httpexception;
        httpexception[HTTPException::Note] << "no cookies are set!";
        throw httpexception;
  }

  std::vector<char> cdat;
  std::copy(curreq->getData(hc),curreq->getData(hc)+strlen(curreq->getData(hc)),
@@ -1389,8 +1392,7 @@ void libhttppp::HttpCookie::parse(libhttppp::HttpRequest* curreq){
      }else if (cdat[cpos] == ';'){
          delimeter = cpos;
      }else if (cpos+1 == cdat.size()) {
		  delimeter = cpos;
          ++delimeter;
		  delimeter = cdat.size();
	  }
	  if (keyendpos != -1 && delimeter != -1) {
		  CookieData* curcookie = addCookieData();