[issue34777] urllib.request accepts anything as a header parameter for some URLs

2018-09-28 Thread Jose Gama
Jose Gama added the comment: Yes, I agree, it's not a bug.This note might help other people who run into the same questions, particularly with error handling.Thank you! On Friday, September 28, 2018, 7:21:03 AM GMT+2, Karthikeyan Singaravelan wrote: Karthikeyan Singaravelan

[issue34777] urllib.request accepts anything as a header parameter for some URLs

2018-09-27 Thread Jose Gama
Jose Gama added the comment: Thank you for the quick reply. You are correct about the difficulties of using a universally accepted list.This is one example that generates errors on the server side. Just for the record. #!/usr/bin/env python3 from urllib.request import Request, urlopenfrom

[issue34777] urllib.request accepts anything as a header parameter for some URLs

2018-09-23 Thread Jose Gama
New submission from Jose Gama : It is possible to use urllib.request defining a header that can be junk in some cases and still get the contents without any warning or error. The behavior depends on the URL and also on the header. -- components: IO files: header-illegal.py messages