summaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2003-08-25 16:17:11 +0000
committerJames Bursa <james@netsurf-browser.org>2003-08-25 16:17:11 +0000
commit294fa48d3d452873c631b8bcf6b07d46f7fc3935 (patch)
treeeb60e619870dacf274c221b8df5b200b6d78f51c /debug
parenta90f94953da3c12f112b0a2b4abc77273fadf800 (diff)
downloadnetsurf-294fa48d3d452873c631b8bcf6b07d46f7fc3935.tar.gz
netsurf-294fa48d3d452873c631b8bcf6b07d46f7fc3935.tar.bz2
[project @ 2003-08-25 16:17:11 by bursa]
Fix 774165 (redirects with empty body). svn path=/import/netsurf/; revision=249
Diffstat (limited to 'debug')
-rw-r--r--debug/netsurfd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/debug/netsurfd.c b/debug/netsurfd.c
index f73e44954..4d21a5495 100644
--- a/debug/netsurfd.c
+++ b/debug/netsurfd.c
@@ -12,19 +12,21 @@
#include "netsurf/content/fetchcache.h"
#include "netsurf/utils/log.h"
-int done;
+int done, destroyed;
void callback(content_msg msg, struct content *c, void *p1,
void *p2, const char *error)
{
LOG(("content %s, message %i", c->url, msg));
- if (msg == CONTENT_MSG_DONE || msg == CONTENT_MSG_ERROR)
+ if (msg == CONTENT_MSG_DONE)
done = 1;
+ else if (msg == CONTENT_MSG_ERROR)
+ done = destroyed = 1;
else if (msg == CONTENT_MSG_STATUS)
printf("=== STATUS: %s\n", c->status_message);
else if (msg == CONTENT_MSG_REDIRECT) {
printf("=== REDIRECT to '%s'\n", error);
- done = 1;
+ done = destroyed = 1;
}
}
@@ -49,7 +51,8 @@ int main(int argc, char *argv[])
puts("=== FAILURE, dumping cache");
}
cache_dump();
- content_remove_user(c, callback, 0, 0);
+ if (!destroyed)
+ content_remove_user(c, callback, 0, 0);
}
cache_quit();