Permalink
Browse files

Fix stuck NullFile with unauthorised POSTs

  • Loading branch information...
sconemad committed Jul 26, 2018
1 parent b4402a3 commit 8a142bbd9928c56126ef18825514a0a911a89b0d
Showing with 2 additions and 2 deletions.
  1. +2 −0 http/ResponseStream.cpp
  2. +0 −2 http/ResponseStream.h
@@ -610,8 +610,10 @@ void ResponseStream::mimeheader_end()

if (!handled) {
// Unhandled - transfer to a null file to discard the data
STREAM_DEBUG_LOG("Using NULL file to discard data");
scx::NullFile* file = new scx::NullFile();
scx::StreamTransfer* xfer = new scx::StreamTransfer(&endpoint());
xfer->set_close_when_finished(true);
file->add_stream(xfer);
scx::Kernel::get()->connect(file);
}
@@ -107,8 +107,6 @@ class HTTP_API ResponseStream : public scx::Stream {

ResponseSequence m_resp_seq;

std::string m_param_string;

scx::Buffer m_buffer;
std::string m_mime_boundary;
int m_mime_boundary_pos;

0 comments on commit 8a142bb

Please sign in to comment.