File: content.proxy.md

package info (click to toggle)
tcllib 1.20%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 68,064 kB
  • sloc: tcl: 216,842; ansic: 14,250; sh: 2,846; xml: 1,766; yacc: 1,145; pascal: 881; makefile: 107; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (20 lines) | stat: -rw-r--r-- 917 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.