> Good catch.  It's the only header where we forget to skip leading
> blanks.

This was overlooked in fetch.c r1.209

ok tb

> 
> I can reproduce and confirm that this does indeed fix the parsing and
> make ftp set the mtime accordingly to Last-Modified.
> 
> > diff --git i/usr.bin/ftp/fetch.c w/usr.bin/ftp/fetch.c
> > index 0ba7ad4d099..b6d6f4d775a 100644
> > --- i/usr.bin/ftp/fetch.c
> > +++ w/usr.bin/ftp/fetch.c
> > @@ -984,6 +984,7 @@ noslash:
> >             } else if (strncasecmp(cp, LAST_MODIFIED,
> >                         sizeof(LAST_MODIFIED) - 1) == 0) {
> >                     cp += sizeof(LAST_MODIFIED) - 1;
> > +                   cp += strspn(cp, " \t");
> >                     cp[strcspn(cp, "\t")] = '\0';
> >                     if (strptime(cp, "%a, %d %h %Y %T %Z", &lmt) == NULL)
> >                             server_timestamps = 0;
> 
> 

Reply via email to