Closed Bug 1797896 Opened 2 years ago Closed 2 years ago

Proxy environment variables should be upper case / case insensitive

Categories

(Core :: Networking, defect, P2)

Firefox 106
defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: bootrino, Assigned: marzvrover, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [necko-triaged])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0

Steps to reproduce:

Linux
AMD64
Ubuntu 22
Mozilla Firefox 105.0b1

I spent nearly a day trying to get Firefox to work with a proxy, via environment variables.

In the end, it turned out that firefox requires the proxy environment variables to be lowercase.

The convention on Linux is that environment variables are upper case. It is a reasonable expectation that using upper case environment variables should work.

Actual results:

Firefox fails to connect to proxy with the following:
export HTTPS_PROXY=http://127.0.0.1:5550
export HTTP_PROXY=http://127.0.0.1:5550
export ALL_PROXY=http://127.0.0.1:5550

Firefox succeeds to connect to proxy with the following:
export https_proxy=http://127.0.0.1:5550
export http_proxy=http://127.0.0.1:5550
export all_proxy=http://127.0.0.1:5550

Expected results:

Firefox should succeed in reading variables regardless of case.

Or should at least respect upper case environment variables on Linux.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

This should belong to the necko team I believe.

Component: DOM: Core & HTML → Networking

Fair request. It seems it's been like this since 2008.
The fix should be quite easy. Just change these places here to check for both lowercase and uppercase env variables.
We want lowercase too for backwards compat (14 years). We can't do case insensitive unfortunately.

Mentor: valentin.gosu
Severity: -- → S3
Keywords: good-first-bug
Priority: -- → P2
Whiteboard: [necko-triaged]

Care if I pick this up as a first bug to squash?

Sure think. Let me know if you need any help getting started.

Assignee: nobody → marzvrover

I have the fix ready for review, but I'm not sure how to get it into the source control.

  • I'm unfamiliar with mercurial
  • I'm using git cinnabar
  • I've created a git branch locally

When I go to push the branch with git push --set-upstream origin marzvrover/fix-1797896 I get asked for my https://hg.mozilla.org username and password. I enter my Bugzilla information which gets a 401.

Flags: needinfo?(valentin.gosu)
Attachment #9301700 - Attachment description: WIP: Bug 1797896 - Proxy environment variables can be uppercase on linux now → Bug 1797896 - Proxy environment variables can be uppercase on linux now

I found that I needed to follow these instructions

Flags: needinfo?(valentin.gosu)
Attachment #9301700 - Attachment description: Bug 1797896 - Proxy environment variables can be uppercase on linux now → Bug 1797896 - Proxy environment variables can be uppercase on linux now r=valentin
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/2c6a8f42551a
Proxy environment variables can be uppercase on linux now r=valentin
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: