Using a form to POST data intermittently causes an error dialog containing the
unhelpful message "user canceled action" and the server hostname. By this
point konq-e has send the post request, but aborts the connection before
sending the "Content-Length:" header and the form data.
Turns out its returning -1/EAGAIN which isn't being handled. No cookie.
Patch below is against 4.2-stable, but nothing related to it has changed as of
today.
cheers,
--chris
Tag: OPENBSD_4_2_BASE
Patch: patches/patch-konq-embed_kdesrc_kio_http_http_cc
--- konq-embed/kdesrc/kio/http/http.cc.orig Sat Jan 21 06:49:34 2006
+++ konq-embed/kdesrc/kio/http/http.cc Sat Sep 29 16:21:07 2007
@@ -3882,7 +3882,7 @@
// m_bufPOST will NOT be empty iff authentication was required before posting
// the data OR a re-connect is requested from ::readHeader because the
// connection was lost for some reason.
- if ( !m_bufPOST.isNull() )
+ if ( !m_bufPOST.isEmpty() )
{
kdDebug(7113) << "(" << m_pid << ") POST'ing saved data..." << endl;
@@ -3895,11 +3895,13 @@
QByteArray buffer;
int old_size;
+ int oerrno = errno;
m_bufPOST.resize(0);
do
{
dataReq(); // Request for data
+ errno = 0;
result = readData( buffer );
if ( result > 0 )
{
@@ -3909,7 +3911,9 @@
memcpy( m_bufPOST.data()+ old_size, buffer.data(), buffer.size() );
buffer.resize(0);
}
- } while ( result > 0 );
+ } while ( result > 0 ||
+ (result == -1 && (errno == EINTR || errno == EAGAIN)));
+ errno = oerrno;
}
if ( result < 0 )