dodo / node-unicodetable

unicode lookup table
MIT License
42 stars 34 forks source link

added proxy option for downloading the unicode file #15

Closed radum closed 10 years ago

radum commented 10 years ago

If we are behind a corporate proxy the postinstall script fails with connection refused so using the process.env.HTTP_PROXY setting we fix this by telling http.get to use the proxy server.

dodo commented 10 years ago

merged by hand.

dodo commented 10 years ago

thank you very much :)

radum commented 10 years ago

Cool thanks for the merge it saves me a lot of trouble when installing as a dependency.

radum commented 10 years ago

I just updated my global packages and saw this:

try to read file /usr/share/unicode/UnicodeData.txt …                                     
/usr/share/unicode/UnicodeData.txt not found.                                             
try to read file /usr/share/unicode-data/UnicodeData.txt …                                
/usr/share/unicode-data/UnicodeData.txt not found.                                        
try to read file UnicodeData.txt …                                                        
UnicodeData.txt not found.                                                                
try to download …                                                                         
GET unicode.org:80/Public/UNIDATA/UnicodeData.txt                                         
Proxy server detected, using proxy settings to download (http://local.proxy:8080)
fetching …                                                                                
saving data as undefined.js …                                                             
saving data as  COLOR: #005a80.js …                                                       
... ... ...

One of the dependencies was using the module and the proxy detection worked like a charm.

dodo commented 10 years ago

Yeah, looks like detection works, but undefined.js & COLOR: #005a80.js? are you sure you're getting the right response?

radum commented 10 years ago

Yep I've tracked back those to the actual module using node-unicodetable so should be ok.