bug-wget
[Top][All Lists]
Advanced

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

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


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] Segmentation fault with current development version of wget
Date: Sun, 16 Jun 2013 14:07:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

thanks for your contribution, some comments inline:

Darshit Shah <address@hidden> writes:

> -          if (statcode == HTTP_STATUS_TEMPORARY_REDIRECT)
> -            return NEWLOCATION_KEEP_POST;
> +          switch (statcode)
> +          {
> +            case HTTP_STATUS_TEMPORARY_REDIRECT:
> +              return NEWLOCATION_KEEP_POST;
> +              break;
> +            case HTTP_STATUS_MOVED_PERMANENTLY:
> +              if(opt.method && strcasecmp(opt.method,"post")!=0)
> +                return NEWLOCATION_KEEP_POST;
> +              break;
> +            case HTTP_STATUS_MOVED_TEMPORARILY:
> +              if(opt.method && strcasecmp(opt.method,"post")!=0)
> +                return NEWLOCATION_KEEP_POST;
> +              break;

please follow the GNU Coding standards here.  Empty space between
function name and '(' and also leave spaces around the operator !=.

> +  if (opt.method && strcasecmp(opt.method,"HEAD")==0)
> +    setoptval("spider","1","spider");

same here.  Also leave a space after the commas.

I have seen these errors in other places too, please double check the
patch.

Could you please also add some comments in the documentation?

We can skip tests for now, since you are going to rewrite the unit tests
for your Summer of Code, but we will probably want something to stress
these features too.

-- 
Giuseppe



reply via email to

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