| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <title>Request Handlers</title> |
| <link rel="stylesheet" href="style.css"> |
| </head> |
| |
| <body> |
| <? prevnext "<h1>Request Handlers</h1>" ?> |
| |
| <p> Now that we have our server initialized, running, and configured, |
| we get to the interesting part: handling incoming requests for web |
| pages. |
| </p> |
| |
| <p> |
| Rivet actually defines two handlers, one for plain old .tcl |
| files, and the other for "PHP style" .rvt files, which contain a |
| mixture of Tcl and HTML. These link an application type to a C |
| function to process that type of request: |
| </p> |
| |
| <pre> |
| <span class="keyword">const</span> handler_rec <span class="variable-name">rivet_handlers</span>[] = |
| { |
| {<span class="string">"application/x-httpd-rivet"</span>, Rivet_SendContent}, |
| {<span class="string">"application/x-rivet-tcl"</span>, Rivet_SendContent}, |
| {NULL} |
| }; |
| </pre> |
| |
| <?footer?> |
| </body> |
| </html> |