mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
add perl wrapper to scgi
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#include <scgi.h>
|
||||
|
||||
static void callback(scgi_socket_t server_sock, scgi_socket_t client_sock, struct sockaddr_in *addr)
|
||||
static void callback(scgi_socket_t server_sock, scgi_socket_t *client_sock, struct sockaddr_in *addr)
|
||||
{
|
||||
scgi_handle_t handle = { 0 };
|
||||
|
||||
if (scgi_parse(client_sock, &handle) == SCGI_SUCCESS) {
|
||||
scgi_param_t *pp;
|
||||
|
||||
*client_sock = SCGI_SOCK_INVALID;
|
||||
|
||||
for(pp = handle.params; pp; pp = pp->next) {
|
||||
printf("HEADER: [%s] VALUE: [%s]\n", pp->name, pp->value);
|
||||
}
|
||||
@@ -15,10 +17,9 @@ static void callback(scgi_socket_t server_sock, scgi_socket_t client_sock, struc
|
||||
printf("\n\nBODY:\n%s\n\n", handle.body);
|
||||
}
|
||||
|
||||
scgi_disconnect(&handle);
|
||||
}
|
||||
|
||||
scgi_disconnect(&handle);
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
Reference in New Issue
Block a user