aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http.cpp8
-rw-r--r--src/http.h2
2 files changed, 9 insertions, 1 deletions
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()
77 case parseHeader: 77 case parseHeader:
78 { 78 {
79 int nLen = pCon->scanInputFor( CR ); 79 int nLen = pCon->scanInputFor( CR );
80 //printf("nLen = %d: :::%s:::\n", nLen, pCon->getInput() );
80 if( nLen == -1 ) 81 if( nLen == -1 )
81 { 82 {
82 return false; 83 pCon->readInput( 1, 0);
83 } 84 }
84 else if( nLen == 0 ) 85 else if( nLen == 0 )
85 { 86 {
@@ -369,3 +370,8 @@ bool Http::checkRequestVer()
369 return false; 370 return false;
370} 371}
371 372
373const char *Http::getHeader( const char *lpStr )
374{
375 return (const char *)hReqHeader[lpStr];
376}
377
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:
241 statusHTTPVersionNotSupported = 505 241 statusHTTPVersionNotSupported = 505
242 }; 242 };
243 243
244 const char *getHeader( const char *lpStr );
245
244private: 246private:
245 Connection *pCon; 247 Connection *pCon;
246 unsigned char nParseState; 248 unsigned char nParseState;