Response tab - copy does not work correctly
Categories
(DevTools :: Netmonitor, defect, P3)
Tracking
(Not tracked)
People
(Reporter: david.balazic, Unassigned)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
315 bytes,
application/octet-stream
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0 Steps to reproduce: Opened (F12) devtools and switched to the Network tab. Loaded a (private) page that has some AJAX calls. Actual results: The response of one AJAX call can not be properly copied from the Response subtab. Expected results: Copy worked fine. The response is text/xml. If I select a few words, I can copy them fine. But if I select all (ctrl-a) then only a small part is coped (the first 220 characters, it seems. The last character copied is a greater-than character. It seems to work correctly with shorter responses, this one is 56.17 KB, as shown in the Size column.
Reporter | ||
Comment 1•6 years ago
|
||
Turns out there was a null byte at offset 220 in the response. FF should still copy it correctly.
Reporter | ||
Comment 2•6 years ago
|
||
This seems related: If XML containing a NULL byte is the response of a GET request in a FF tab, the error report on the page also cuts off the string at the NULL byte: XML Parsing Error: not well-formed Location: https://localhost:8443/test_webservice/services/tester/test1 Line Number 1, Column 145: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:test1Response xmlns:ns2="http://xx.yyy.zz/"><ns2:test1>foo <---- it is cut off here Show source (ctrl-u) shows the entire XML response.
Comment 3•5 years ago
|
||
Can you please attach a simple test case (or URL), so we can test it on our machines?
Thanks!
Honza
Reporter | ||
Comment 4•5 years ago
|
||
Put the attached test.jsp into a plain tomcat installation, then try to load it like http://localhost/ROOT/test.jsp (or similar).
This reproduces issue 1.
As for issue 2, now it does not show any of the content.... wait, now it does. Weird. Apparently the page output changes with each refresh between these 3 options:
-
full error report:
XML Parsing Error: not well-formed
Location: https://localhost:8443/VS.web/pages/test.jsp
Line Number 1, Column 145:<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:test1Response xmlns:ns2="http://xx.yyy.zz/"><ns2:test1>foo -
only the error, no content:
XML Parsing Error: not well-formed
Location: https://localhost:8443/VS.web/pages/test.jsp
Line Number 1, Column 145: -
empty page (an empty red border)
In all cases ctrl-u shows the correct page source:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:test1Response xmlns:ns2="http://xx.yyy.zz/"><ns2:test1>foo[0000]</ns2:test1></ns2:test1Response></soap:Body></soap:Envelope>
(note that when selecting all and copying, again it is cut at the zero byte, only the part from begin to zero is copied)
PS: You can try to have the same file served by using apache and plain HTML, but I guess putting the NUL bytes in it would be tricky.
PPS: Now I tested with FF v64.0, behaves same as before.
Updated•5 years ago
|
Comment 5•4 years ago
|
||
This should be fixed by work in bug 1613885 and it work for me on my machine.
David, can you please verify on your machine using Firefox Nightly build, thanks!
https://www.mozilla.org/en-US/firefox/channel/desktop/
Honza
Reporter | ||
Comment 6•4 years ago
|
||
Testing with nightly 76.0a1 (2020-03-16) (64-bit)
(In reply to David Balažic from comment #4)
- full error report:
XML Parsing Error: not well-formed
Location: https://localhost:8443/VS.web/pages/test.jsp
Line Number 1, Column 145:<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:test1Response xmlns:ns2="http://xx.yyy.zz/"><ns2:test1>fooIn all cases ctrl-u shows the correct page source:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:test1Response xmlns:ns2="http://xx.yyy.zz/"><ns2:test1>foo[0000]</ns2:test1></ns2:test1Response></soap:Body></soap:Envelope>(note that when selecting all and copying, again it is cut at the zero byte, only the part from begin to zero is copied)
This all is still behaving the same, as in the quoted message:
- text cut in the page
- copying from the source display (ctrl-u) is cut off at the NUL character: I select foo[0000]</ns2 , what is copied/pasted: foo
Original issue (devtools/network/response can not be copied) is still the same too: if I select part of all of the response of the above test.jsp, and try to copy, only the part up to the NUL character is copied.
Comment 7•4 years ago
|
||
Hey David,
(In reply to David Balažic from comment #2)
This seems related:
If XML containing a NULL byte is the response of a GET request in a FF tab,
the error report on the page also cuts off the string at the NULL byte:XML Parsing Error: not well-formed
Location: https://localhost:8443/test_webservice/services/tester/test1
Line Number 1, Column 145:<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:
test1Response xmlns:ns2="http://xx.yyy.zz/"><ns2:test1>foo <---- it is
cut off hereShow source (ctrl-u) shows the entire XML response.
This doesn't look like a devtools related issue.
As to the original devtools response issue here is a screen cast of what i see
http://g.recordit.co/bwln4DI0NF.gif
Can you please do a screencast of what you get?
Thanks
Reporter | ||
Comment 8•4 years ago
|
||
Is that on a mac? Windows might not support NUL characters in clipboard.
I (on Windows 10) get the same as you, except that when I paste the string, it goes only up to the NUL character, all that follows is missing. Like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:test1Response xmlns:ns2="http://xx.yyy.zz/"><ns2:test1>foo <---- it is cut off here
Updated•2 years ago
|
Description
•