mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-06 00:47:11 +02:00
Major plugin refactor and cleanup.
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
This commit is contained in:
65
vendor/POCO/Net/src/HTTPIOStream.cpp
vendored
Normal file
65
vendor/POCO/Net/src/HTTPIOStream.cpp
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
//
|
||||
// HTTPIOStream.cpp
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPIOStream
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
|
||||
#include "Poco/Net/HTTPIOStream.h"
|
||||
#include "Poco/Net/HTTPClientSession.h"
|
||||
|
||||
|
||||
using Poco::UnbufferedStreamBuf;
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
HTTPResponseStreamBuf::HTTPResponseStreamBuf(std::istream& istr):
|
||||
_istr(istr)
|
||||
{
|
||||
// make sure exceptions from underlying string propagate
|
||||
_istr.exceptions(std::ios::badbit);
|
||||
}
|
||||
|
||||
|
||||
HTTPResponseStreamBuf::~HTTPResponseStreamBuf()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HTTPResponseIOS::HTTPResponseIOS(std::istream& istr):
|
||||
_buf(istr)
|
||||
{
|
||||
poco_ios_init(&_buf);
|
||||
}
|
||||
|
||||
|
||||
HTTPResponseIOS::~HTTPResponseIOS()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HTTPResponseStream::HTTPResponseStream(std::istream& istr, HTTPClientSession* pSession):
|
||||
HTTPResponseIOS(istr),
|
||||
std::istream(&_buf),
|
||||
_pSession(pSession)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
HTTPResponseStream::~HTTPResponseStream()
|
||||
{
|
||||
delete _pSession;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
Reference in New Issue
Block a user