Closed Bug 1421207 Opened 7 years ago Closed 7 years ago

Copy as curl not working

Categories

(Firefox :: Untriaged, defect)

57 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: janghou, Unassigned)

Details

Attachments

(1 file)

Attached image firefox-warnings.png
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171123171849

Steps to reproduce:

I was searching on google:
https://www.google.nl/search?client=ubuntu&channel=fs&q=mount+with+noatime+option&ie=utf-8&oe=utf-8

Then I ran into some troubles
- strange pop-ups appearing following the first link (see attachment)
- copy as curl not working
- Firefox getting different search results as Opera/Chromium



Actual results:

Google in Firefox gave me as first result this link:
ftp://ftp.iitb.ac.in/LDP/en/solrhe/chap6sec73.html

Following that link I got weird pop-ups showing:
`550 Failed to change directory.`

That seems to be a won't fix bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=271923

So i tried the search in Chromium:
The first result in Chromium:
http://en.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap6sec73.html

No weird pop-ups. Is Chromium a better browser?

So i tried to find out why Google is serving different result to the same device, with just a different browser. Is there some browser sniffing going on? Shouldn't the world be platform/browser neutral. 

Coping the initial request `copy as curl` in Firefox gave me this:
curl 'https://www.google.nl/search?client=ubuntu&hs=vgz&channel=fs&ei=SC4dWtWHCsbGwQK--oaACA&btnG=Zoeken&q=mount+with+noatime+option' --2.0 -H 'Host: www.google.nl' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: https://www.google.nl/' -H 'Cookie: 1P_JAR=2017-11-28-09; NID=xxx; CONSENT=WP.2672cc' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache'

A curl command that can't be run on Ubuntu 16.04:
`curl: option --2.0: is unknown`

The curl request in Chromium:
curl 'https://www.google.nl/search?client=ubuntu&channel=fs&q=mount+with+noatime+option&ie=utf-8&oe=utf-8&gfe_rd=cr&dcr=0&ei=USodWvGZMufG8AeAsamoAw' -H 'pragma: no-cache' -H 'dnt: 1' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.9,nl;q=0.8' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/62.0.3202.94 Chrome/62.0.3202.94 Safari/537.36' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'cache-control: no-cache' -H 'authority: www.google.nl' -H 'cookie: 1P_JAR=2017-11-28-09; NID=xxxxxx' --compressed


Expected results:

- Getting a working `curl command`
- no weird `pop-ups`, that look like rogue script driven pop-ups, while they should be a proper clear designed warning from Firefox.
- getting the same results in Google on a different browser on the same device/time/location. 

So several issues, in one bug report, maybe it should be split up.
Please file separate bugs for each issue. Thank you!

https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
OK, I renamed this bug: `Copy as Curl not working`

I will file the two others issues as separate bugs, although I feel the context of the issues together is a bug itself.

So, essentially this bug is now:

Steps to reproduce:
Open: https://www.google.nl/search?client=ubuntu&channel=fs&q=mount+with+noatime+option&ie=utf-8&oe=utf-8

Open developer tools and  `copy as curl` in Firefox gave me this:
curl 'https://www.google.nl/search?client=ubuntu&hs=vgz&channel=fs&ei=SC4dWtWHCsbGwQK--oaACA&btnG=Zoeken&q=mount+with+noatime+option' --2.0 -H 'Host: www.google.nl' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: https://www.google.nl/' -H 'Cookie: 1P_JAR=2017-11-28-09; NID=xxx; CONSENT=WP.2672cc' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache'

A curl command that can't be run on Ubuntu 16.04:
`curl: option --2.0: is unknown

Actual results::
Execute curl in terminal
`curl: option --2.0: is unknown`

Expected results:
Getting a working `curl command`
Summary: Copy as curl not working (and other issues) → Copy as curl not working
Separate Pop-up bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1421566
Google offering different search results to Firefox and Chromium
https://bugzilla.mozilla.org/show_bug.cgi?id=1421569
Please, take a look again
This is nor RESOLVED nor INCOMPLETE.

Again, the the complete issue is a major issue for Firefox users (and thus Firefox), splitting this up into detailed lower level bugs is technically right, but will hide the real-world issue.

We end up: 
- won't fix FTP bugs
https://bugzilla.mozilla.org/show_bug.cgi?id=1421566
- it's Google's bug, not ours.
https://bugzilla.mozilla.org/show_bug.cgi?id=1421569


So there is not issue, while clearly there is.

It would be nice if someone can at least pay attention to that.

Do you want me to file another bug to address `Copy as curl is not working`?
I'm on Firefox 60.0.1 (64-bit) and copy as cURL doesn't work at all. Nothing is copied to my clipboard.
Whereas other options like copy post data work fine. 

Steps: 

1. Go to dev tool
2. See any api call
3. Try to copy as cURL
4. Nothing on the clipboard.
Same issue as @ankit.singhaniyaz, I'm on Firefox Quantum 61.0b13 (64-bit), it happens for couple of months now...
Same issue:
On version 61.0.1 (64-bit)



Copy as cURL, nothing changes in my clipboard.
Copy URL and Copy Post Data both works and expected changes are in clipboard.
I am also want say about this bug.  Firefox Quantum 61.0.1 (64-бит) Linux Mint 19
Can confirm, same FF version (61.0.1), Debian sid.
I also have this issue under Firefox 61.0. The browser console shows the following error when clicking 'Copy as cURL':

    TypeError: requestPostData.postData is undefined[Learn More] RequestListContextMenu.js:324:7
Same issue with 61.0.2 on macOS, this has been going on for a while and even before it completely stopped working it was flaky at best and mostly resolved by a browser restart. I've switched to Chrome if I need to do anything with the inspector.

(In reply to ankit.singhaniyaz from comment #6)

I'm on Firefox 60.0.1 (64-bit) and copy as cURL doesn't work at all. Nothing
is copied to my clipboard.
Whereas other options like copy post data work fine.

Steps:

  1. Go to dev tool
  2. See any api call
  3. Try to copy as cURL
  4. Nothing on the clipboard.

Exactly the same for 60.9.0esr on Debian Buster.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: