Somebody already used the METHOD="POST" in a CGI script. On PC the method POST in a Web page takes the value of parameter through STDIN, therefore, i think i'm having problems. Sorry if I'm wrong, but the STDIN in this case (on ARM) is a serial port. When a use a methot=GET on my HTML file everthing works fine, but my application needs to be done using POST to take the URL parameters.
Method Post
Are you using Boa? I am not sure if I got this working or not. I was quite awhile ago I did this, but maybe it helps: ****** How do I get POST data in BOA? UserDir <directory> The name of the directory which is appended onto a user's home directory if a user request is received. What is the file name of received requests? Modify boa.conf After line: DocumentRoot /www Add: UserDir /postData everytime you go through the while loop (in your program) check to see if there is something in postData. If there is, then parse it, perform the required changes at the uP AND delete the postData file. example: UserDir public_html # DirectoryIndex: Name of the file to use as a pre-written HTML *** Dave
Thanks Dave, i had not thought this before. Yes i'm using Boa. but didn't solve the problem. I try here change my boa.conf and other error (400 Bad Request) is shown when i try to take the post parameters. I think something is still wrong. I created a file with a name postData, also don't know if is the correct way. What did u do? When you sent a POST request you took it on a file named postFile, for example? see my boa.conf Port 80 User root Group root ErrorLog /dev/console AccessLog /dev/null ServerName friendly-arm DocumentRoot /www UserDir /www/postData DirectoryIndex index.html KeepAliveMax 1000 KeepAliveTimeout 10 MimeTypes /etc/mime.types DefaultType text/plain CGIPath /bin AddType application/x-httpd-cgi cgi ScriptAlias /cgi/ /www/cgi/
Sorry, I never finished this project. I do recall an issue with getting CGI scripts recognised. Also, I think to parse the data that should end up in the postdata directory you might need one of these C files that are attached.
The way that the data comes on GET or POST is the same, i parse it already, but just through GET. I will try i little and try to make others validations on my software to ensure safety. If I get success I post here. Thanks for help