environs/simplestreams/simplestreams.go leaks test:// and file:// URLs into the http.DefaultClient

Bug #1223752 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Low
Unassigned
juju-core
Won't Fix
Medium
Unassigned

Bug Description

I believe the code was written such that it wanted to isolate stuff like RegisterProtocol("file") and RegisterProtocol("test") into just the simplestreams httpClient object.

However, it uses the http.DefaultTransport which means when you register a new transport you are mutating the global net/http library state.

I'll link a branch that shows this.

At runtime, it has the property that any net/http.* request will be able to access file:// URLs. In the test suite, it means that we expose test:// URLs as well as file:// URLs to all tests.

Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → 2.0
Changed in juju-core:
importance: High → Medium
tags: added: simplestreams
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Re-targeting to Juju 2.x

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 2.1.0
Changed in juju-core:
status: Triaged → Won't Fix
tags: added: unit-tests
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.1-rc2 → none
Revision history for this message
Anastasia (anastasia-macmood) wrote :

As this is a tech-debt item, I am lowering its Importance.

Changed in juju:
importance: Medium → Low
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.