From 8cba0ee929112a125eb41228f667e8bdd0224f58 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 7 Mar 2007 01:22:44 +0000 Subject: david - yep, forgot to commit --- src/http.cpp | 8 +++++++- src/http.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/http.cpp b/src/http.cpp index 92bd89c..df7dafe 100644 --- a/src/http.cpp +++ b/src/http.cpp @@ -77,9 +77,10 @@ bool Http::parseRequest() case parseHeader: { int nLen = pCon->scanInputFor( CR ); + //printf("nLen = %d: :::%s:::\n", nLen, pCon->getInput() ); if( nLen == -1 ) { - return false; + pCon->readInput( 1, 0); } else if( nLen == 0 ) { @@ -369,3 +370,8 @@ bool Http::checkRequestVer() return false; } +const char *Http::getHeader( const char *lpStr ) +{ + return (const char *)hReqHeader[lpStr]; +} + diff --git a/src/http.h b/src/http.h index fc9e15a..7e9f9a0 100644 --- a/src/http.h +++ b/src/http.h @@ -241,6 +241,8 @@ public: statusHTTPVersionNotSupported = 505 }; + const char *getHeader( const char *lpStr ); + private: Connection *pCon; unsigned char nParseState; -- cgit v1.2.3