Closed smallfish06 closed 6 months ago
Currently FeedParserDict's headers type is dict. https://github.com/kurtmckee/feedparser/blob/0af72dc07bcd3c6e74dfc40a913a346f8a6fa45e/feedparser/api.py#L195-L200
But while assigning response_headers which is type of CaseInsensitiveDict to headers it act like dict. https://github.com/kurtmckee/feedparser/blob/0af72dc07bcd3c6e74dfc40a913a346f8a6fa45e/feedparser/api.py#L224-L227
response_headers
CaseInsensitiveDict
headers
If this acts like this it's hard to parse Content-Type
Content-Type
HTTP/1.1 200 OK Connection: keep-alive Date: Sat, 30 Dec 2023 09:20:21 GMT Content-Type: text/xml; charset=UTF-8 Transfer-Encoding: chunked
If it is expected behavior, how can I modify Content-Type overriding Http requester?
FYI: requests headers type is CaseInsensitiveDict https://github.com/psf/requests/blob/72eccc8dd8b7c272e520f22b0256386c80864e94/src/requests/adapters.py#L293-L314
Currently FeedParserDict's headers type is dict. https://github.com/kurtmckee/feedparser/blob/0af72dc07bcd3c6e74dfc40a913a346f8a6fa45e/feedparser/api.py#L195-L200
But while assigning
response_headers
which is type ofCaseInsensitiveDict
toheaders
it act like dict. https://github.com/kurtmckee/feedparser/blob/0af72dc07bcd3c6e74dfc40a913a346f8a6fa45e/feedparser/api.py#L224-L227If this acts like this it's hard to parse
Content-Type
If it is expected behavior, how can I modify Content-Type overriding Http requester?
FYI: requests headers type is CaseInsensitiveDict https://github.com/psf/requests/blob/72eccc8dd8b7c272e520f22b0256386c80864e94/src/requests/adapters.py#L293-L314