author | spiralman <spiralman> | 2003-03-15 16:19:51 (UTC) |
---|---|---|
committer | spiralman <spiralman> | 2003-03-15 16:19:51 (UTC) |
commit | d421f8708983df4bab1f9069e87cda94e1d4aeea (patch) (unidiff) | |
tree | 3aa7587f72705f73e65a5dc1aa3e824311fba2d1 /noncore/net/ubrowser/httpfactory.cpp | |
parent | 69823b154b29cd62c9d53f7ebdaae4cb7dd61939 (diff) | |
download | opie-d421f8708983df4bab1f9069e87cda94e1d4aeea.zip opie-d421f8708983df4bab1f9069e87cda94e1d4aeea.tar.gz opie-d421f8708983df4bab1f9069e87cda94e1d4aeea.tar.bz2 |
HttpFactory::data() now returns 0 if there is a 404 error (previously, if there was a 404 error on an image, the browser would get stuck in an infinite loop).
also, fixed html detection
Diffstat (limited to 'noncore/net/ubrowser/httpfactory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/ubrowser/httpfactory.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/net/ubrowser/httpfactory.cpp b/noncore/net/ubrowser/httpfactory.cpp index 4ace4cb..b37e9f9 100644 --- a/noncore/net/ubrowser/httpfactory.cpp +++ b/noncore/net/ubrowser/httpfactory.cpp | |||
@@ -225,3 +225,3 @@ const QByteArray HttpFactory::processResponse( int sockfd, bool &isText ) const | |||
225 | printf( "HttpFactory::processResponse: content type text\n" ); | 225 | printf( "HttpFactory::processResponse: content type text\n" ); |
226 | if( currentLine.contains( "html", false ) ) | 226 | if( currentLine.contains( "html", false ) >= 1) |
227 | { | 227 | { |
@@ -245,2 +245,8 @@ const QByteArray HttpFactory::processResponse( int sockfd, bool &isText ) const | |||
245 | 245 | ||
246 | if( currentLine.contains( "404", false ) >= 1 ) | ||
247 | { | ||
248 | printf( "HttpFactory::processResponse: 404 error\n" ); | ||
249 | return 0; | ||
250 | } | ||
251 | |||
246 | currentLine = ""; | 252 | currentLine = ""; |