From c3206cf551e5949acec6af1e66d24d06dc1ea909 Mon Sep 17 00:00:00 2001 From: jxh Date: Sun, 21 Mar 1999 11:44:41 +0000 Subject: IO_Acceptor changed to permit compilation on platforms without Asynch IO. Parse_Headers altered to correct some missing cases. --- apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp | 2 +- apps/JAWS/PROTOTYPE/JAWS/Parse_Headers.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'apps/JAWS') diff --git a/apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp b/apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp index feb37fc175c..adb42fe16e0 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp +++ b/apps/JAWS/PROTOTYPE/JAWS/IO_Acceptor.cpp @@ -194,8 +194,8 @@ JAWS_IO_Asynch_Acceptor::close (void) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) #if defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS) template class ACE_Asynch_Acceptor; -template class ACE_Singleton; #endif /* defined (ACE_WIN32) || defined (ACE_HAS_AIO_CALLS) */ +template class ACE_Singleton; template class ACE_Singleton; template class ACE_LOCK_SOCK_Acceptor; template class ACE_LOCK_SOCK_Acceptor; diff --git a/apps/JAWS/PROTOTYPE/JAWS/Parse_Headers.cpp b/apps/JAWS/PROTOTYPE/JAWS/Parse_Headers.cpp index 21aaba59b64..6dde3f7eca3 100644 --- a/apps/JAWS/PROTOTYPE/JAWS/Parse_Headers.cpp +++ b/apps/JAWS/PROTOTYPE/JAWS/Parse_Headers.cpp @@ -43,6 +43,10 @@ JAWS_Parse_Headers::parse_headers (JAWS_Header_Info *info, mb.crunch (); return 0; } + else if (mb.length () < mb.size ()) + { + return 0; + } else if (mb.length () == mb.size ()) { // This is one of those cases that should rarely ever happen. @@ -56,6 +60,12 @@ JAWS_Parse_Headers::parse_headers (JAWS_Header_Info *info, info->status (JAWS_Header_Info::TOO_LONG); return 1; } + else if (mb.length () > mb.size ()) + { + ACE_DEBUG ((LM_DEBUG, "JAWS_Parse_Headers: buffer overrun!!\n")); + info->status (JAWS_Header_Info::TOO_LONG); + return 1; + } ACE_DEBUG ((LM_DEBUG, "JAWS_Parse_Headers -- shouldn't be here!\n")); return 1; -- cgit v1.2.1