Issue #449 resolved

HeaderMap elements method should always return a list

Anonymous created an issue

Currently the elements method of the HeaderMap class returns None when the header is not found. It would be easier and simpler to return an empty list instead of None.

Is there anyone using that code that would be annoyed by doing so?

Reported by lawouach

Comments (4)

  1. Robert Brewer

    That's OK with me as long as nobody complains. I think my intent in the beginning was some vague idea to distinguish between an emtpy header and a missing header. Both RFC 2616 (HTTP/1.1) and RFC 822 specify that the header value can be completely blank, but that's rarely seen in practice.

  2. Anonymous

    Fine. That's why I opened this ticket before doing it. I wanted to check no one would come and say "wait i am using that very feature".

    I don't think that many people use it so I'll change that to an empty list for consitancy.

  3. Log in to comment