FastCGI Developer's Kit README
------------------------------
- $Id: README,v 1.22 2003/06/22 00:16:45 robs Exp $
+ $Id: README,v 1.23 2003/06/22 00:51:26 robs Exp $
Copyright (c) 1996 Open Market, Inc.
See the file "LICENSE.TERMS" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
2.4.1
+ *) Fix fcgi_streambuf::underflow() such that when there is no buffer
+ the character isn't removed. AIDA Shinra <shinra@j10n.org>
+
*) Add attach() and detach() support.
//
-// $Id: fcgio.cpp,v 1.13 2002/02/24 20:12:22 robs Exp $
+// $Id: fcgio.cpp,v 1.14 2003/06/22 00:51:27 robs Exp $
//
// Allows you communicate with FastCGI streams using C++ iostreams
//
// uflow() removes the char, underflow() doesn't
int fcgi_streambuf::uflow()
{
- int rv = underflow();
- if (this->bufsize) gbump(1);
- return rv;
+ if (this->bufsize)
+ {
+ int c = underflow();
+ gbump(1);
+ return c;
+ }
+ else
+ {
+ return FCGX_GetChar(this->fcgx);
+ }
}
-// Note that the expected behaviour when there is no buffer varies
int fcgi_streambuf::underflow()
{
if (this->bufsize)
}
else
{
- return FCGX_GetChar(this->fcgx);
+ return FCGX_UnGetChar(FCGX_GetChar(this->fcgx), this->fcgx);
}
}