Fix download code.
We need not check request::continuation() for stream resource.
This commit is contained in:
@@ -309,19 +309,16 @@ void ExportKeyStreamResource::handleRequest(const Http::Request& request,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string buffer;
|
string buffer;
|
||||||
if (!request.continuation()) // Needed for WStreamResource ?
|
Error e;
|
||||||
|
GpgMEWorker gpgw;
|
||||||
|
e = gpgw.ExportPublicKey(m_fpr.toUTF8().c_str(), buffer);
|
||||||
|
if (e.code() != 0)
|
||||||
{
|
{
|
||||||
Error e;
|
m_tmwMessage->SetText(e.asString());
|
||||||
GpgMEWorker gpgw;
|
LGE(e);
|
||||||
e = gpgw.ExportPublicKey(m_fpr.toUTF8().c_str(), buffer);
|
return;
|
||||||
if (e.code() != 0)
|
|
||||||
{
|
|
||||||
m_tmwMessage->SetText(e.asString());
|
|
||||||
LGE(e);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
suggestFileName(m_fpr + WString(".asc"), ContentDisposition::Attachment);
|
|
||||||
}
|
}
|
||||||
|
suggestFileName(m_fpr + WString(".asc"), ContentDisposition::Attachment);
|
||||||
|
|
||||||
istrstream bufStream(buffer.c_str());
|
istrstream bufStream(buffer.c_str());
|
||||||
handleRequestPiecewise(request, response, bufStream);
|
handleRequestPiecewise(request, response, bufStream);
|
||||||
|
|||||||
Reference in New Issue
Block a user