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

Bug#531157: [http transport]: does not allow empty Reason-Phase in Status-Line (breaks on 304s of squid)



Hello Modestas Vainius,

> the patch attached is trivial and probably needs only a couple of minutes to
> review. Could this be done any time soon?

I am not an apt maintainer, so this is not an official review,
but i have a little comment on your patch, beside my comment that it is
not always a good idea to react in such an angry fashion just because
nobody respond directly on this minor issue, it doesn't help in getting
the review faster or only delay it further... -- and btw: personally
i would wish that squid response with a "304 Not Modified" or so...
Just because it is allowed doesn't mean it should be done...


Anyway: Your patch uses the %n conversion specifier,
the manpage of sscanf says the following about this directive:
"The C standard says: 'Execution of a %n directive does not increment the
assignment count returned at the completion  of  execution' but the
Corrigendum seems to contradict this. Probably it is wise not to make
any assumptions on the effect of %n conversions on the return value."
(scanf (3) -> Description -> Conversions ~ 2008-07-12)

At least this means it maybe increment the counter or not, so in the if
we would need to check for sscanf < 4 instead of sscanf != 4 to be able
to work under each standard conform implementation of the sscanf method.

This said, i would suggest to not use the %n at all and just remove the
space before the last directive. So this space which delimits the Result
and the Code is then included in Code -- but Code is not really used anyway
as far as i can see (just in one little error message and an extra space
would not harm here i guess) - or if this really harms anybody we could
simply remove the heading space in an added else part of the if's...


What do you think?


Best regards / Mit freundlichen Grüßen,

David "DonKult" Kalnischkies

P.S.: I will also ask Michael Vogt about it then he is back online
next week (i hope), just be a bit more patient, everything will be fine. ;)



Reply to: