Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using url-retrieve to fetch an https resource through an http proxy

Tags:

emacs

I'm trying to install el-get at my workplace, where all traffic passes through a Squid proxy.

(add-to-list 'load-path "~/.emacs.d/el-get/el-get")
(unless (require 'el-get nil t)
  (setq url-proxy-services '(("https" . "proxy.work.com:8080"))) ; if needed
  (url-retrieve
   "https://raw.github.com/dimitri/el-get/master/el-get-install.el"
   (lambda (s)
     (end-of-buffer)
     (eval-print-last-sexp))))

As far as I can tell, this fails because Squid doesn't support https through http. (Squid returns HTTP/501 Not Implemented)

I can and will install el-get manually, but my curiosity has been piqued. How do browsers work around this?

like image 232
Natan Yellin Avatar asked Oct 06 '11 10:10

Natan Yellin


1 Answers

In your case you can simply just retrieve the same file from http://raw.github.com/dimitri/el-get/master/el-get-install.el as github offers both SSL and non-SSL interfaces to it's raw file service.

like image 58
stsquad Avatar answered Oct 03 '22 13:10

stsquad