O'Reilly logo

Practical Programming in Tcl & Tk, Third Edition by Brent B. Welch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Programming Reference

This section summarizes many of the more useful functions defined by the server. These tables are not complete, however. You are encouraged to read through the code to learn more about the features offered by the server.

Table 18-1 summarizes the Httpd functions used when returning pages to the client.

Table 18-1. Httpd support procedures.
Httpd_Error sock codeReturns a simple error page to the client. The code is a numeric error code like 404 or 500.
Httpd_ReturnData sock type dataReturns a page with Content-Type type and content data.
Httpd_ReturnFile sock type fileReturns a file with Content-Type type.
Httpd_Redirect newurl sockGenerates a 302 error return with a Location of newurl.
Httpd_SelfUrl urlExpands url to include ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required