[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
post_data
- From: Jason Borden <jborden sorenson com>
- To: tux-list redhat com
- Subject: post_data
- Date: Tue, 26 Mar 2002 10:37:25 -0700
I'm having difficulty being able to read from user_req_t->post_data . I've
looked at other messages on the board for tips, but have been unsuccessful in
making it work. Here's a sample code snipet I'm working on:
extern char* make_message(const char *fmt, ...);
int ret = TUX_RETURN_USERSPACE_REQUEST;
char *reply;
switch (req->event)
{
case 0:
ret = tux(TUX_ACTION_READ_POST_DATA, req);
req->event = 1;
break;
case 1:
req->event = 2;
req->http_status = 200;
reply = make_message("HTTP/1.0 200 OK\r\nContent-Type:
text/html\r\n\r\n%s", req->post_data);
req->object_addr = reply
req->objectlen = strlen(reply);
ret = tux(TUX_ACTION_SEND_BUFFER, req);
free(reply);
break;
case 2:
ret = tux(TUX_ACTION_FINISH_CLOSE_REQ, req);
break;
}
return ret;
>From what I gather from other messages, this should work, but it just seems
to die. I've also tried executing the TUX_ACTION_READ_POST_DATA from the same
event that is attempting to access post_data, as the man page suggests it
works atomically, but that didn't seem to work either. If there is a working
code sample available, would somebody please point me to it?
Thanks,
Jason
P.S. Tux is great! I've created a working session manager and database pool
for it and it way faster than the servlet/jsp stuff we're currently using.
Keep up the excelent work!!!
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[]