New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 590487 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , All
Pri: 3
Type: Bug



Sign in to add a comment

Browser tries to downlaod instead of rendering plain text TCP stream

Reported by yangyude...@gmail.com, Feb 28 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.116 Chrome/48.0.2564.116 Safari/537.36

Example URL:
http://livebgp.netsec.colostate.edu:50002/

Steps to reproduce the problem:
1. Open a plain text TCP stream  livebgp.netsec.colostate.edu:50002 or livebgp.netsec.colostate.edu:50001
2. Wait for output

What is the expected behavior?
New output rendered on page in real time.
---example-below---
<xml><BGP_MONITOR_MESSAGE xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="urn:ietf:params:xml:ns:bgp_monitor" xmlns:bgp="urn:ietf:params:xml:ns:xfb" xmlns:ne="urn:ietf:params:xml:ns:network_elements"><SOURCE><ADDRESS afi="1">129.82.138.6</ADDRESS><PORT>179</PORT><ASN2>6447</ASN2></SOURCE><DEST><ADDRESS afi="0">ipv4any</ADDRESS><PORT>179</PORT><ASN2>64514</ASN2></DEST><MONITOR><ADDRESS afi="0">ipv4any</ADDRESS><PORT>0</PORT><ASN4>0</ASN4></MONITOR><OBSERVED_TIME precision="false"><TIMESTAMP>1456621267</TIMESTAMP><DATETIME>2016-02-28T01:01:07Z</DATETIME></OBSERVED_TIME><SEQUENCE_NUMBER>404512488</SEQUENCE_NUMBER><COLLECTION>TABLE_DUMP</COLLECTION><STATUS Author_Xpath="/BGP_MONITOR_MESSAGE/MONITOR"><TYPE>FSM_STATE_CHANGE </TYPE></STATUS></BGP_MONITOR_MESSAGE><BGP_MONITOR_MESSAGE xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="urn:ietf:params:xml:ns:bgp_monitor" xmlns:bgp="urn:ietf:params:xml:ns:xfb" xmlns:ne="urn:ietf:params:xml:ns:network_elements"><SOURCE><ADDRESS afi="1">129.82.138.6</ADDRESS><PORT>179</PORT><ASN2>6447</ASN2></SOURCE><DEST><ADDRESS afi="0">ipv4any</ADDRESS><PORT>179</PORT><ASN2>64514</ASN2></DEST><MONITOR><ADDRESS afi="0">ipv4any</ADDRESS><PORT>0</PORT><ASN4>0</ASN4></MONITOR><OBSERVED_TIME precision="false"><TIMESTAMP>1456621267</TIMESTAMP><DATETIME>2016-02-28T01:01:07Z</DATETIME></OBSERVED_TIME><SEQUENCE_NUMBER>404512489</SEQUENCE_NUMBER><COLLECTION>TABLE_DUMP</COLLECTION><STATUS Author_Xpath="/BGP_MONITOR_MESSAGE/MONITOR"><TYPE>FSM_STATE_CHANGE </TYPE></STATUS></BGP_MONITOR_MESSAGE>

What went wrong?
Browser tries to download the page instead

Did this work before? Yes 

Chrome version: 48.0.2564.116  Channel: n/a
OS Version: Ubuntu 15.10
Flash Version: Shockwave Flash 11.2 r999

In 2013 Chromium could render it correctly.
 
Components: UI>Browser>Downloads
Labels: -Pri-2 Pri-3 OS-All
Woah, that's an actual HTTP/0.9 site. As such there are no response headers saying content encoding is some format. My _guess_ then is that we are content sniffing it as XML and deciding not to display natively.
It used to work (rendering in real time), and it still works in Firefox.
There are valid use cases where rendering it instead of downloading it is more helpful. And for a stream, I don't know how the browser can properly handle the download (either the download never ends or it misses new stream)

Comment 3 by mef@chromium.org, Mar 1 2016

I can't reproduce the issue in 49.0.2623.63 beta (64-bit) on Linux. I've opened http://livebgp.netsec.colostate.edu:50002/ and the XML gets displayed in browser window.

Could you try to reproduce with disabled extensions?

Comment 4 by mef@chromium.org, Mar 1 2016

Labels: Needs-Feedback
With no extensions,
Windows
Google Chrome	51.0.2664.1 (Official Build) canary (64-bit)
Google Chrome	49.0.2623.64 (Official Build) beta-m (64-bit)
Linux x64
Chromium	48.0.2564.116 (Developer Build) Ubuntu 15.10 (64-bit)

All try to download the url when there is a stream, never ending file "download"

Comment 6 by mef@chromium.org, Mar 2 2016

Cc: rdsmith@chromium.org
Labels: -Needs-Feedback
Status: Untriaged (was: Unconfirmed)
Hrm, it is reproducible today with the same browser, not sure what have changed. 
Per conversation with rdsmith this sounds like a bug and it is confirmed.

Here is excerpt from the net log:

1415298: URL_REQUEST
http://livebgp.netsec.colostate.edu:50002/
Start Time: 2016-03-02 17:37:14.419

t=  9006 [st=     0] +REQUEST_ALIVE  [dt=?]
t=  9006 [st=     0]    DELEGATE_INFO  [dt=1]
                        --> delegate_info = "NavigationResourceThrottle"
t=  9007 [st=     1]    URL_REQUEST_DELEGATE  [dt=0]
t=  9007 [st=     1]    URL_REQUEST_START_JOB  [dt=0]
                        --> load_flags = 37120 (MAIN_FRAME | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
                        --> method = "GET"
                        --> priority = "HIGHEST"
                        --> url = "http://livebgp.netsec.colostate.edu:50002/"
t=  9007 [st=     1]   +URL_REQUEST_START_JOB  [dt=33341]
                        --> load_flags = 37120 (MAIN_FRAME | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
                        --> method = "GET"
                        --> priority = "HIGHEST"
                        --> url = "http://livebgp.netsec.colostate.edu:50002/"
t=  9007 [st=     1]      URL_REQUEST_DELEGATE  [dt=0]
t=  9007 [st=     1]      HTTP_CACHE_GET_BACKEND  [dt=0]
t=  9007 [st=     1]      HTTP_CACHE_OPEN_ENTRY  [dt=0]
                          --> net_error = -2 (ERR_FAILED)
t=  9007 [st=     1]      HTTP_CACHE_CREATE_ENTRY  [dt=0]
t=  9007 [st=     1]      HTTP_CACHE_ADD_TO_ENTRY  [dt=0]
t=  9007 [st=     1]      URL_REQUEST_DELEGATE  [dt=0]
t=  9007 [st=     1]     +HTTP_STREAM_REQUEST  [dt=108]
t=  9007 [st=     1]        HTTP_STREAM_REQUEST_STARTED_JOB
                            --> source_dependency = 1415301 (HTTP_STREAM_JOB)
t=  9115 [st=   109]        HTTP_STREAM_REQUEST_BOUND_TO_JOB
                            --> source_dependency = 1415301 (HTTP_STREAM_JOB)
t=  9115 [st=   109]     -HTTP_STREAM_REQUEST
t=  9115 [st=   109]     +HTTP_TRANSACTION_SEND_REQUEST  [dt=0]
t=  9115 [st=   109]        HTTP_TRANSACTION_SEND_REQUEST_HEADERS
                            --> GET / HTTP/1.1
                                Host: livebgp.netsec.colostate.edu:50002
                                Connection: keep-alive
                                Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
                                Upgrade-Insecure-Requests: 1
                                User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.63 Safari/537.36
                                Accept-Encoding: gzip, deflate, sdch
                                Accept-Language: en-US,en;q=0.8
t=  9115 [st=   109]     -HTTP_TRANSACTION_SEND_REQUEST
t=  9115 [st=   109]     +HTTP_TRANSACTION_READ_HEADERS  [dt=33233]
t=  9115 [st=   109]        HTTP_STREAM_PARSER_READ_HEADERS  [dt=53]
t=  9168 [st=   162]        HTTP_STREAM_PARSER_READ_HEADERS  [dt=33180]
t= 42348 [st= 33342]        HTTP_TRANSACTION_READ_RESPONSE_HEADERS
                            --> HTTP/0.9 200 OK
t= 42348 [st= 33342]     -HTTP_TRANSACTION_READ_HEADERS
t= 42348 [st= 33342]      HTTP_CACHE_WRITE_INFO  [dt=0]
t= 42348 [st= 33342]      HTTP_CACHE_WRITE_DATA  [dt=0]
t= 42348 [st= 33342]      HTTP_CACHE_WRITE_INFO  [dt=0]
t= 42348 [st= 33342]      URL_REQUEST_DELEGATE  [dt=0]
t= 42348 [st= 33342]   -URL_REQUEST_START_JOB
t= 42348 [st= 33342]    URL_REQUEST_DELEGATE  [dt=0]
t= 42348 [st= 33342]    HTTP_TRANSACTION_READ_BODY  [dt=0]
t= 42348 [st= 33342]    HTTP_CACHE_WRITE_DATA  [dt=0]
t= 42348 [st= 33342]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 771
t= 42349 [st= 33343]    URL_REQUEST_SET_PRIORITY
                        --> priority = 0
t= 42349 [st= 33343]   +HTTP_TRANSACTION_READ_BODY  [dt=52]
t= 42349 [st= 33343]      DOWNLOAD_STARTED
                          --> source_dependency = 1415494 (DOWNLOAD)
t= 42401 [st= 33395]   -HTTP_TRANSACTION_READ_BODY
t= 42401 [st= 33395]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t= 42401 [st= 33395]    HTTP_TRANSACTION_READ_BODY  [dt=56953]
t= 99354 [st= 90348]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t= 99354 [st= 90348]    HTTP_TRANSACTION_READ_BODY  [dt=54]
t= 99408 [st= 90402]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t= 99408 [st= 90402]    HTTP_TRANSACTION_READ_BODY  [dt=55953]
t=155361 [st=146355]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t=155361 [st=146355]    HTTP_TRANSACTION_READ_BODY  [dt=1000]
t=156361 [st=147355]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t=156361 [st=147355]    HTTP_TRANSACTION_READ_BODY  [dt=55006]
t=211367 [st=202361]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t=211367 [st=202361]    HTTP_TRANSACTION_READ_BODY  [dt=1000]
t=212367 [st=203361]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t=212367 [st=203361]    HTTP_TRANSACTION_READ_BODY  [dt=56007]
t=268374 [st=259368]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t=268374 [st=259368]    HTTP_TRANSACTION_READ_BODY  [dt=1000]
t=269374 [st=260368]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t=269374 [st=260368]    HTTP_TRANSACTION_READ_BODY  [dt=50006]
t=319380 [st=310374]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t=319380 [st=310374]    HTTP_TRANSACTION_READ_BODY  [dt=54]
t=319434 [st=310428]    URL_REQUEST_JOB_BYTES_READ
                        --> byte_count = 766
t=319434 [st=310428]   +HTTP_TRANSACTION_READ_BODY  [dt=?]
1415494: DOWNLOAD
/usr/local/google/home/mef/Downloads/download (3).crdownload
Start Time: 2016-03-02 17:37:47.762

t=42349 [st= 0] +DOWNLOAD_ITEM_ACTIVE  [dt=?]
                 --> danger_type = "NOT_DANGEROUS"
                 --> file_name = ""
                 --> final_url = "http://livebgp.netsec.colostate.edu:50002/"
                 --> has_user_gesture = false
                 --> id = "8"
                 --> original_url = "http://livebgp.netsec.colostate.edu:50002/"
                 --> start_offset = "0"
                 --> type = "NEW_DOWNLOAD"
t=42349 [st= 0]    DOWNLOAD_URL_REQUEST
                   --> source_dependency = 1415298 (URL_REQUEST)
t=42350 [st= 1]   +DOWNLOAD_FILE_OPENED  [dt=32]
                   --> file_name = "/usr/local/google/home/mef/Downloads/.com.google.Chrome.tlztjX"
                   --> start_offset = "0"
t=42350 [st= 1]      DOWNLOAD_STREAM_DRAINED
                     --> num_buffers = 0
                     --> stream_size = 0
t=42351 [st= 2]      DOWNLOAD_ITEM_UPDATED
                     --> bytes_so_far = "0"
t=42354 [st= 5]     +DOWNLOAD_FILE_RENAMED  [dt=28]
                     --> new_filename = "/usr/local/google/home/mef/Downloads/download (3).crdownload"
                     --> old_filename = "/usr/local/google/home/mef/Downloads/.com.google.Chrome.tlztjX"
t=42354 [st= 5]        DOWNLOAD_FILE_CLOSED
t=42382 [st=33]   -DOWNLOAD_FILE_OPENED
t=42383 [st=34]   +DOWNLOAD_FILE_OPENED  [dt=?]
                   --> file_name = "/usr/local/google/home/mef/Downloads/download (3).crdownload"
                   --> start_offset = "0"
t=42383 [st=34]     -DOWNLOAD_FILE_RENAMED
t=42383 [st=34]      DOWNLOAD_ITEM_RENAMED
                     --> new_filename = "/usr/local/google/home/mef/Downloads/download (3).crdownload"
                     --> old_filename = ""

Comment 7 by mef@chromium.org, Mar 2 2016

Here is the netlog.
net-internals-log-downloa-instead-of-render.json
353 KB View Download
Status: WontFix (was: Untriaged)
I wonder how much we care about HTTP/0.9.

Regardless, the server is sending us non-ASCII characters (Like 0x01).  If we see one of them when we're mime sniffing, we decide it's a binary file and download it.  If we don't, we display it.  This is working as intended.  Whether or not it sends us one varies over time.
Whether or not it sends us a non-ASCII byte varies over time, that is, which explains why it doesn't always repro.

Sign in to add a comment