summaryrefslogtreecommitdiffstats
path: root/kioslave
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-02 05:19:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-02 05:19:12 +0000
commit5f99bff82d3413803bcc652999f4f631058179d6 (patch)
tree5725f0b58bd7221ea0021631bf63361dcf6dca06 /kioslave
parent0cebafdea768e0e7716a3e7e8c8b0198f03bc53e (diff)
downloadtdelibs-5f99bff82d3413803bcc652999f4f631058179d6.tar.gz
tdelibs-5f99bff82d3413803bcc652999f4f631058179d6.zip
* Added new networkstatus widget from SuSE
* Fixed up the HTTP kioslave git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1170793 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave')
-rw-r--r--kioslave/http/http.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc
index e28e482bf..4fa95780f 100644
--- a/kioslave/http/http.cc
+++ b/kioslave/http/http.cc
@@ -1804,9 +1804,11 @@ bool HTTPProtocol::isOffline(const KURL &url)
TQByteArray reply;
TQDataStream stream(params, IO_WriteOnly);
- stream << url.url();
- if ( dcopClient()->call( "kded", "networkstatus", "status(TQString)",
+ if ( url.host() == TQString::fromLatin1("localhost") || url.host() == TQString::fromLatin1("127.0.0.1") || url.host() == TQString::fromLatin1("::") ) {
+ return false;
+ }
+ if ( dcopClient()->call( "kded", "networkstatus", "status()",
params, replyType, reply ) && (replyType == "int") )
{
int result;
@@ -2210,6 +2212,11 @@ bool HTTPProtocol::httpOpen()
// Conditional cache hit. (Validate)
}
+ if (bCacheOnly && bOffline)
+ {
+ error( ERR_OFFLINE_MODE, m_request.url.url() );
+ return false;
+ }
if (bCacheOnly)
{
error( ERR_DOES_NOT_EXIST, m_request.url.url() );
@@ -2217,7 +2224,7 @@ bool HTTPProtocol::httpOpen()
}
if (bOffline)
{
- error( ERR_COULD_NOT_CONNECT, m_request.url.url() );
+ error( ERR_OFFLINE_MODE, m_request.url.url() );
return false;
}
}