File: content.proxy.md

package info (click to toggle)
tcllib 2.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 83,560 kB
  • sloc: tcl: 306,798; ansic: 14,272; sh: 3,035; xml: 1,766; yacc: 1,157; pascal: 881; makefile: 124; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (20 lines) | stat: -rw-r--r-- 899 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
httpd::content::proxy
=============
Back to: [Index](index.md) | [Package httpd::content](content.md)

The proxy handler farms out the generation of content to an external process running
on a known port. The external process is assumed to be a proxy server, and it is the job
of this object to transform the query as received into a form that is understood by
the external server.

To implement a proxy handler, replace **proxy_info** with one that will return a list
containing the following:

    PROXYHOST PROXYPORT PROXYURI
    
* PROXYHOST - The hostname or IP address of the server running the process
* PROXYPORT - The port to connect to
* PROXYURI - The replacement GET/POST/etc request to make to the external process.

The **proxy_info** method also makes a handly place to spawn a locally hosted process on demand.
For an example of this, see the [docserver.tcl](docserver.tcl) Example.