UrlFile::sweep shouldn't free smart allocated objs
UrlFile::sweep shouldn't free smart allocated objs Closes #1643 Reviewed By: @jdelong Differential Revision: D1144563 Pulled By: @scannell
Esse commit está contido em:
@@ -37,6 +37,9 @@ public:
|
||||
|
||||
/*
|
||||
* Efficient string concatenation.
|
||||
*
|
||||
* StringBuffer is designed not to contain any malloc()d memory (only
|
||||
* per-request smart allocated memory) based on sweeping-related assumptions.
|
||||
*/
|
||||
struct StringBuffer {
|
||||
static const int kDefaultOutputLimit = StringData::MaxSize;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
namespace HPHP {
|
||||
|
||||
IMPLEMENT_OBJECT_ALLOCATION(UrlFile)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const StaticString s_http_response_header("http_response_header");
|
||||
@@ -43,6 +42,12 @@ UrlFile::UrlFile(const char *method /* = "GET" */,
|
||||
m_isLocal = false;
|
||||
}
|
||||
|
||||
void UrlFile::sweep() {
|
||||
using std::string;
|
||||
m_error.~string();
|
||||
MemFile::sweep();
|
||||
}
|
||||
|
||||
const StaticString
|
||||
s_remove_user_pass_pattern("#://[^@]+@#"),
|
||||
s_remove_user_pass_replace("://");
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário