Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion httpie/output/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_stream_type_and_kwargs(
raw_content_type_header = headers.get('Content-Type', None)
if raw_content_type_header:
content_type_header, _ = parse_content_type_header(raw_content_type_header)
is_stream = (content_type_header == 'text/event-stream')
is_stream = (content_type_header.lower() == 'text/event-stream')

if not env.stdout_isatty and not prettify_groups:
stream_class = RawStream
Expand Down
4 changes: 4 additions & 0 deletions tests/test_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ def test_redirected_stream(httpbin):
['Accept:text/event-stream; charset=utf-8'],
3
),
(
['Accept:Text/Event-Stream'],
3
),
(
['Accept:text/plain'],
1
Expand Down
Loading