[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Segmentation fault with current development version of wg

From: Darshit Shah
Subject: Re: [Bug-wget] Segmentation fault with current development version of wget
Date: Thu, 2 May 2013 01:55:47 +0530

On Thu, May 2, 2013 at 12:56 AM, Gijs van Tulder <address@hidden> wrote:

> 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

Unless we explicitly check for opt.method = POST, this will cause a lot of
issues. Since the macro is being called on every redirect, even
HEAD/PUT/OPTIONS headers will get suspended to give way to GET. That is not
the behaviour we want.
And if we are explicitly writing the above test, then why not simply allow
the xstrdup to copy the string? (Although, I believe using a const *string
may be more efficient. )

@Tim: The various tests using -r are all in spider mode. This part of the
code is not reached when in spider mode.
opt.method && strcasecmp(opt.method,"POST") == 0 provides for more readable
code. Maybe we should use that.

@Giuseppe: Thanks for that patch! I didn't think along those lines, adding
a new command. It also cleans up the code from http.c. It shouldn't have
been there in the first place.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]