Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QHttpRequest returns isSuccessful() == true even if the sending part has been interrupted #30

Open
HappySeaFox opened this issue Jan 9, 2017 · 0 comments

Comments

@HappySeaFox
Copy link

Hi. I'd like to implement a HTTP server supporting modern POST multipart/form-data requests. I am lucky and QHTTP supports such requests. However if use curl to send a file to my server like that:

curl "http://127.0.0.1:5000/video.mp4" -F "file=@H:\video.mp4" -v

and then immediately Ctrl+C, I'll get an end() signal:

connect(m_request, &qhttp::server::QHttpRequest::end, this, &Connection::end, Qt::QueuedConnection);
....
void Connection::end()
{
    qDebug("Transfer finished successfully: %s", m_request->isSuccessful() ? "yes" : "no");
}

Is there a way to determine that the POST request has been interrupted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant