Hi,
For the new --body-data option most of the code that used to reference
opt.post_data has been changed to use opt.body_data. I found one
remaining reference, hidden in one of the WARC-writing sections of
src/http.c. Wget would crash if you combine --body-data with --warc-file.
It's a simple fix. See the attached patch.
Regards,
Gijs
>From d2e6e16b3062cc0e6b3c13fd04e3654ed2dbdb6e Mon Sep 17 00:00:00 2001
From: Gijs van Tulder <gvtul...@gmail.com>
Date: Sun, 21 Apr 2013 22:36:50 +0200
Subject: [PATCH] Remove old reference to opt.post_data.
---
src/ChangeLog | 5 +++++
src/http.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 8a60e5d..64fc634 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-21 Gijs van Tulder <gvtul...@gmail.com>
+
+ * http.c: Copy opt.body_data to the WARC file, instead of
+ opt.post_data (the old option).
+
2013-04-12 Gijs van Tulder <gvtul...@gmail.com>
* warc.c: Generate unique UUIDs for the manifest and the record
diff --git a/src/http.c b/src/http.c
index 3e4d7cc..88f7a96 100644
--- a/src/http.c
+++ b/src/http.c
@@ -2150,7 +2150,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
warc_payload_offset = ftello (warc_tmp);
/* Write a copy of the data to the WARC record. */
- int warc_tmp_written = fwrite (opt.post_data, 1, body_data_size, warc_tmp);
+ int warc_tmp_written = fwrite (opt.body_data, 1, body_data_size, warc_tmp);
if (warc_tmp_written != body_data_size)
write_error = -2;
}
--
1.7.9.5