[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Segmentation fault with current development version of wg
From: |
Gijs van Tulder |
Subject: |
Re: [Bug-wget] Segmentation fault with current development version of wget |
Date: |
Wed, 01 May 2013 21:26:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
Giuseppe Scrivano wrote:
> what about this patch? Any comment?
Another suggestion: why not save the original opt.method, set opt.method
to NULL and put the original opt.method back later?
Gijs
diff --git a/src/retr.c b/src/retr.c
index d51b7e7..2aee578 100644
--- a/src/retr.c
+++ b/src/retr.c
@@ -679,22 +679,23 @@ calc_rate (wgint bytes, double secs, int *units)
#define SUSPEND_POST_DATA do { \
post_data_suspended = true; \
saved_post_data = opt.body_data; \
saved_post_file_name = opt.body_file; \
+ saved_method = opt.method; \
opt.body_data = NULL; \
opt.body_file = NULL; \
opt.method = NULL; \
} while (0)
#define RESTORE_POST_DATA do { \
if (post_data_suspended) \
{ \
opt.body_data = saved_post_data; \
opt.body_file = saved_post_file_name; \
+ opt.method = saved_method; \
post_data_suspended = false; \
- opt.method = "POST"; \
} \
} while (0)
static char *getproxy (struct url *);
@@ -721,10 +722,11 @@ retrieve_url (struct url * orig_parsed, const char
*origurl, char **file,
int redirection_count = 0;
bool post_data_suspended = false;
char *saved_post_data = NULL;
char *saved_post_file_name = NULL;
+ char *saved_method = NULL;
/* If dt is NULL, use local storage. */
if (!dt)
{
dt = &dummy;
- Re: [Bug-wget] Segmentation fault with current development version of wget, Darshit Shah, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget, Giuseppe Scrivano, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget,
Gijs van Tulder <=
- Re: [Bug-wget] Segmentation fault with current development version of wget, Giuseppe Scrivano, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget, Gijs van Tulder, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget, Darshit Shah, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget, Darshit Shah, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget, Gijs van Tulder, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget, Giuseppe Scrivano, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget, Daniel Stenberg, 2013/05/01
- Re: [Bug-wget] Segmentation fault with current development version of wget, Giuseppe Scrivano, 2013/05/02
- Re: [Bug-wget] Segmentation fault with current development version of wget, Darshit Shah, 2013/05/04
- Re: [Bug-wget] Segmentation fault with current development version of wget, Giuseppe Scrivano, 2013/05/04