################
### Overview ###
################

Boa is a aingle-tasking HTTP server, designed for speed and security. Boa is used as the web 
server on Vivotek's embedded system. For Kilrogg's web server, we refer to Axis' boa and slightly 
modify it. The main difference between original boa and Axis' boa is the "basic authentication" and 
"transfer" function added by Axis. "TRANSFER" functions are designed for the communication between http 
and rtsp server. Please refer to the document of rtsp streaming server for the detail of communication. 
We will focus on the modifications we have done in this document.

#################
### Multicast ###
#################

For multicast, only file descriptor exchange is required.

#####################
### RTP over HTTP ###
#####################

"RTP over HTTP" is more complicated.
The rtsp client will send two requests to http server. The first is "GET /live.sdp" and the second one is "POST /live.sdp".
1. GET /live.sdp
For "RTP over HTTP", the field in "x_sessioncookie" in the GET request will not be empty. "x_sessioncookie" is used to differentiate 
"multicast" and "RTP over HTTP" connection. For this GET request, "200 OK" is replied to rtsp cleint.

2. POST /live.sdp
In general, only file descriptor exchange (as in multicast) is required. But rtsp client often sent additional describe info (encoded 
in base64 format) after the POST request. Therefore, we also need to send the describe info to rtsp server. But the value of "content-length" 
filed in POST request is fake (a large number in general). Boa will try to get such large content then "infinite loop" occurs. To solve 
this problem, we midified boa. Boa will leave the loop when something read after the POST request. We do not ensure that boa will always 
get the base64 encoded describe info, but our solution works fine in our experiments. So ... ... 

Besides, for rtsp server's determination of "GET" and "POST", we add more information in the buffer that will be sent to rtsp 
server. Please refer to init_transfer() in transfer.c.

#########################
### Boa Configuration ###
#########################

In boa.conf : 
Something like this will be defined,
Transfer /live.sdp /tmp/httpfdipc.sck
Transfer /test.sdp /tmp/testfdipc.sck

Which means that when client tried to connect to "http://192.168.1.1/live.sdp" or "http://192.168.1.1/test.sdp", boa 
will treat "/live.sdp" and "/test.sdp" as a "TRANSFER" uri. In the "TRANSFER" function, the socket (between http client 
and http server) will be transfered to other process (like rtsp streaming server). The transfer will be done through the 
unix domain socket (ex. /tmp/httpfdipc.sck or /tmp/testfdipc.sck).

In mime.types : 

application/x-rtsp-tunnelled    sdp

We will add "application/x-rtsp-tunnelled    sdp" in mime.types in general. Then for rtp over http, 
"application/x-rtsp-tunnelled" could be replied to client.
