|
Re: Arduino + Ethernet Shield Help
Do you really need to look for: /
Does your *non existent* file system have any subfolders or other pages?
Considering you know this is not going to be a full standards compliant webserver I submit to you that you do not need to look for anything other than POST.
The first time you load the page the browser will use GET anyway.
Now if you plan on actually parsing browser requests for several pages and returning error messages then yes at that point you should mind the: /
For now how about you just look for the "POST". It's handy the code example already shows you how.
Just get rid of the first conditional looking for the: /
Use the client.find as demonstrated in the example to look for: POST
Keep in mind that you'll loose that original serial debug when you do this because you should delete that as well.
So be prepared to not see the "HTTP" or the "favicon.i" in the serial monitor.
If you have not already: leave the serial debug line I offered above in your code.
Let us save 'strcmp' for discussions on buffer security issues. You do not need that for this purpose at all.
Also look at every occurance of 'PinD' you need them all to match when it comes to the case of the text.
Last edited by techhelpbb : 06-08-2013 at 16:58.
|