Re: cgi question (General questions)
Thanks for pointing out, I found out bug in wodWebServer. It should be fixed now. Can you please request update for wodWebServer, or download it again if you're evaluating it.
I didn't increate major version number yet, I will do it probably on next monday.
Your code should be as it was so far, such as [code]Private Sub Http1_RequestDone(ByVal User As WODWEBSERVERCOMLib.IWebUser)
If InStr(1, User.Request.URI, cgi-bin/Chat.exe ) Then
User.Response.CGIExecute yourcgi.exe
Else
User.Response.FileName = App.Path & \index.htm
End If
End Sub[/code]
and your CGI may look, for example, like this (C sample) [code] handle = open( output.txt , O_BINARY | O_WRONLY | O_CREAT, S_IREAD | S_IWRITE);
if (handle !=(-1))
{
lseek(handle, 0, SEEK_END);
while (gets(buff))
{
write(handle, buff, strlen(buff));
write(handle, \r\n , 2);
}
}
close(handle);
puts( Content-Type: text/html );
puts( );
printf( Done!\r\n , total);
[/code]
Let me know how it goes with new version
Kreso
Complete thread:
- cgi question - ricado, 2006-01-15, 22:45
- Re: cgi question - wodSupport, 2006-01-15, 23:37
- Re: cgi question - ricado, 2006-01-15, 23:52
- Re: cgi question - wodSupport, 2006-01-16, 22:16
- Re: cgi question - ricado, 2006-01-17, 16:29
- Re: cgi question - wodSupport, 2006-01-16, 22:16
- Re: cgi question - ricado, 2006-01-15, 23:52
- Re: cgi question - wodSupport, 2006-01-15, 23:37