Styled-output incorrectly uses double-underline attribute
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curl (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
curl (openSUSE) |
Fix Released
|
Medium
|
Bug Description
Using --styled-output (which is the default running cURL interactive terminal) results in the double-underline text attribute being set incorrectly and remaining on after cURL exits.
For example, running this in xfce4-terminal:
curl -I google.com
Results in double-underlined text starting from the ":" after "Location", and running into the shell prompt after cURL has exited.
The intended behaviour of this feature is HTTP header names to be bold, and header values to be normal.
While I noticed the problem in xfce4-terminal on Xubuntu, others have reported the issue on other terminal emulators, so I don't think this is specific to xfce4-terminal.
Man page for --styled-output doesn't mention setting double underline either:
Enables the automatic use of bold font styles when writing HTTP headers to the terminal. Use --no-styled-output to switch them off.
Added in 7.61.0.
This has already been fixed upstream by using the correct font attribute control code.
Upstream cURL bug report:
https:/
Fixed upstream in:
https:/
Changed in curl (openSUSE): | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Created attachment 780410
Screenshot of messed up terminal
While using curl I've stumbled upon a bug, which messes up my terminal. The end result is that the characters are bold and double underlined (see attached screenshot for details). This stays even after the invocation of curl, so I have to actively reset the terminal after invoking curl.
I have the following version of curl installed:
kbabioch@ aquarius: ~> rpm -qi curl
Name : curl
Version : 7.61.0
It has something to do with "styled-output", i.e. it works fine with the option "no-styled-output".
stracing this, shows the following:
kbabioch@ aquarius: ~> strace -e write -s 120 curl -I registry. opensuse. org length\ 33[21m: 0\r\n", 28Content-length: 0 \33[21m: https:/ /registry. opensuse. org/\r\n", 51Location: https:/ /registry. opensuse. org/
write(1, "HTTP/1.1 301 Moved Permanently\r\n", 32HTTP/1.1 301 Moved Permanently
) = 32
write(1, "\33[1mContent-
) = 28
write(1, "\33[1mLocation
) = 51
write(1, "\r\n", 2
) = 2
+++ exited with 0 +++
I'm using GNOME's terminal:
kbabioch@ aquarius: ~> rpm -qi gnome-terminal
Name : gnome-terminal
Version : 3.28.2