Skip to content

Commit

Permalink
Merge pull request #31 from zellerin/master
Browse files Browse the repository at this point in the history
Use *default-http-proxy* as default.
  • Loading branch information
hanshuebner committed Jul 4, 2013
2 parents 5130825 + a8a3ba2 commit c9b978f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
17 changes: 16 additions & 1 deletion doc/index.xml
Expand Up @@ -957,7 +957,8 @@ T</span>
the request should be sent. Or it can be a list of two
values - a string denoting the proxy server and an integer
denoting the port to use (which will default to 80
otherwise).
otherwise). Defaults to
<clix:arg>*default-http-proxy*</clix:arg>.
<clix:arg>proxy-basic-authorization</clix:arg> is used
like <clix:arg>basic-authorization</clix:arg>, but for the
proxy, and only if <clix:arg>proxy</clix:arg> is true.
Expand Down Expand Up @@ -1172,6 +1173,20 @@ T</span>
</clix:description>
</clix:special-variable>

<clix:special-variable name="*default-http-proxy*">
<clix:description>
<p>
HTTP proxy to be used as default for the proxy keyword
argument of <clix:ref>HTTP-REQUEST</clix:ref>. If not
<code>NIL</code>, it should be a string denoting a proxy
server through which the request should be sent. Or it
can be a list of two values - a string denoting the proxy
server and an integer denoting the port to use (which
will default to 80 otherwise).
</p>
</clix:description>
</clix:special-variable>

<clix:special-variable name="*drakma-default-external-format*">
<clix:description>
<p>
Expand Down
1 change: 1 addition & 0 deletions packages.lisp
Expand Up @@ -37,6 +37,7 @@
(:export #:*allow-dotless-cookie-domains-p*
#:*body-format-function*
#:*remove-duplicate-cookies-p*
#:*default-http-proxy*
#:*drakma-default-external-format*
#:*header-stream*
#:*ignore-unparseable-cookie-dates-p*
Expand Down
5 changes: 3 additions & 2 deletions request.lisp
Expand Up @@ -205,7 +205,7 @@ headers of the chunked stream \(if any) as a second value."
(user-agent :drakma)
(accept "*/*")
range
proxy
(proxy *default-http-proxy*)
proxy-basic-authorization
real-host
additional-headers
Expand Down Expand Up @@ -375,7 +375,8 @@ If PROXY is not NIL, it should be a string denoting a proxy
server through which the request should be sent. Or it can be a
list of two values - a string denoting the proxy server and an
integer denoting the port to use \(which will default to 80
otherwise). PROXY-BASIC-AUTHORIZATION is used like
otherwise). Defaults to *default-http-proxy*.
PROXY-BASIC-AUTHORIZATION is used like
BASIC-AUTHORIZATION, but for the proxy, and only if PROXY is
true.
Expand Down
7 changes: 7 additions & 0 deletions specials.lisp
Expand Up @@ -248,6 +248,13 @@ proceeds as described in the HTTP-REQUEST documentation entry.")
"An alist which maps time zone abbreviations to Common Lisp
timezones.")

(defvar *default-http-proxy* nil
"HTTP proxy to be used as default. If not NIL, it should be a string
denoting a proxy server through which the request should be sent. Or
it can be a list of two values - a string denoting the proxy server
and an integer denoting the port to use \(which will default to 80
otherwise).")

;; stuff for Nikodemus Siivola's HYPERDOC
;; see <http://common-lisp.net/project/hyperdoc/>
;; and <http://www.cliki.net/hyperdoc>
Expand Down

0 comments on commit c9b978f

Please sign in to comment.