Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support proxy. #26

Merged
merged 3 commits into from
Sep 25, 2012
Merged

support proxy. #26

merged 3 commits into from
Sep 25, 2012

Conversation

mattn
Copy link
Contributor

@mattn mattn commented Sep 11, 2012

if having HTTP_PROXY environment variable, you'll be possible to get working with http proxy.

@@ -180,6 +180,12 @@ Package.prototype.download = function () {
var src = url.parse(this.assetUrl);
var req = src.protocol === 'https:' ? https : http;

if (process.env.HTTP_PROXY) {
var proxy = url.parse(process.env.HTTP_PROXY);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you just set src here? also, doesn't look like you're using proxy.path anywhere…

src = url.parse(process.env.HTTP_PROXY);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you are right.

@fat
Copy link
Contributor

fat commented Sep 13, 2012

not really sure what you're trying to do with this (sorry if im being dense)…

bower should already support http urls.

just use this format git+https://…

@mattn
Copy link
Contributor Author

mattn commented Sep 14, 2012

bower should already support http urls.

just use this format git+https://…

I think so.

@fat
Copy link
Contributor

fat commented Sep 17, 2012

what i meant by my comment is, i don't think we need this patch… thanks!

@fat fat closed this Sep 17, 2012
@mattn
Copy link
Contributor Author

mattn commented Sep 18, 2012

what i meant by my comment is, i don't think we need this patch… thanks!

Even if bower support http scheme for git, we can't access over the remote. I think bower need this patch.

Thanks.

@jfaissolle
Copy link

At the moment, I cannot use bower in corporate environment because of the lack of proxy support...

@fat
Copy link
Contributor

fat commented Sep 18, 2012

can you provide a test case for what this feature is adding?

@fat fat reopened this Sep 18, 2012
@mattn
Copy link
Contributor Author

mattn commented Sep 19, 2012

not impossible, but the tests need to write proxy server.
it's bits hard, i guess.

@fat
Copy link
Contributor

fat commented Sep 20, 2012

feels kinda sketch… have you tested this with a proxy, and confirmed it works?

@mattn
Copy link
Contributor Author

mattn commented Sep 20, 2012

have you tested this with a proxy, and confirmed it works?

Yep. But I have not tested with a proxy required authentication. :-(

@ataube
Copy link

ataube commented Sep 24, 2012

So is there any decision yet? I really would appreciate proxy support because we cannot use Bower in our company so far.

fat added a commit that referenced this pull request Sep 25, 2012
@fat fat merged commit 3c85f9d into bower:master Sep 25, 2012
@fat
Copy link
Contributor

fat commented Sep 25, 2012

yep, published as 0.2.0

@mattn
Copy link
Contributor Author

mattn commented Sep 25, 2012

Thanks.

@hale
Copy link

hale commented Feb 28, 2013

I think this is still an issue for when the URL is git://... rather than http://...?

@mattn
Copy link
Contributor Author

mattn commented Feb 28, 2013

@hale What do you mean?

3c85f9d#L0R303

This change replace git:// to http:// to use HTTP_RPOXY.

@hale
Copy link

hale commented Mar 1, 2013

Ah okay, sorry I must have misunderstood the code. Bower doesn't work for me behind a proxy when other command line utils do, but perhaps this is specific to my network.

@mattn
Copy link
Contributor Author

mattn commented Mar 1, 2013

Are you using proxy require authentication?

@hale
Copy link

hale commented Mar 1, 2013

Nope.

@mattn
Copy link
Contributor Author

mattn commented Mar 1, 2013

Do you have HTTP_PROXY environment variable?

@hale
Copy link

hale commented Mar 1, 2013

I just tried setting the proxy in a different way and it works. Thanks, appreciate the help :)

@iliyi
Copy link

iliyi commented Aug 2, 2013

What dose this "a different way" means ? How to do?

@mk-pmb
Copy link

mk-pmb commented Oct 30, 2014

@hale, how/where did you configure it to make it work?

sheerun pushed a commit that referenced this pull request Jun 10, 2016
Validate that `main` conforms to the bower.json spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants