Yep - the post only handles predefined file types and to be honest I have never uploaded html files using the post method (that is the only reason why it is not there).
(although I could image using a default post page - like you use the 404 error page - to allow a user to upload all web pages in a project. This would allow the FTP server to be completely removed in favour of working purely with a browser. This would also remove some contraints when working with FTP whereas it often needs special firewall setting because people/companies are sometimes very restrictive with FTP ports.)
Generally it is possible to add further post types or, as you have done, make the text based type less restrictive. I will have a think and maybe add more text types or a general 'catch all' text type. In any case you seem to be having no real problem with the code and as you have seen it is not that difficult to add some more flexibilty if needed in an emergency.
For this type of work I never in fact work on the target - the simulator lets you test and develop much faster and comfortably. But I am assuming that you are using the Coldfire on an eval or your own board, and debugging is generally performed out fo FLASH (there is only 32k SRAM and this is usually too restrictive to share with a program and variables and decent LAN buffer space - RAM debugging is only possible with mini-programs. For Ethernet projects any spare RAM is best used for LAN buffers since here the rule is simply 'the bigger the better'). When working with Codewarrior, pressing the debug button will simply connect to the device in debug mode and doesn't mean that the FLASH content corresponds with the latest compiled project state. Therefore it is always necessary to first synchronise the FLASH contents using the FLASH utility tool.
Although this works well, you still have a limited amount of breakpoints (three I think) and the FLASHing time adds up throughout the day. This is another reason why it is best to do as much work with the simulator (no download times, very fast compiling, great debugging) as possible. Based on our own experiences over the last few years (we also had a forerunner of the simulator before the uTasker project) it is possible to cut many embedded project development times by around 60% by simply using the simulator consequently and then working on the target for verification and low level details.
As far as I understand, it is the browser which recognises the file type when performing the post. I don't actually understand what criteria they use and I have in the past simply looked at the content infomation to learn whether a PDF is for example of binary or other type.
I don't know whether you have already noticed but the port method used is a little special...
You will find that the uTasker project is a bit 'alternative' and sometimes does some little tricks to enable useful things to be performed without having to go a long way to do it.
<form action=HS.bin
enctype="multipart/form-data" method="post">
<p>
<input type="file" name="datafile" size="30" £DN0></p>
<p><input type="submit" value="Upload new software" £DN0></p>
</form>
You obviously know this extract from the post HTML.
If you have already learned a bit about the way the dynamic web serving is operating you will know that the £DN0 sequence means "disable the form field if the project doesn't have a large enough file system for a software upload". I am sure that much more detail of such things will be posted soon in a thread of this topic.
The form action=HS.bin is interpreted by the uTasker web server as "post the file which will follow to the file system and name it H.bin. Once the post has completed, serve the web page S.html". Of course the application can intervene and do it differently, but if it can also let the web server part do as it is told. This is practical because it allows the html file to define where posted data ends up in the file system and also what page to serve on success, and is very practical for the software upload in the demo project because the user can upload new software with any name he/she likes and it still ends up in exactly the place in FLASH that you want it to end up at. Afterwards, the web server serves a nice page thanking him/her for doing its and informing that the board will now be reset to complete the update. All will almost zero effort at the application layer!
Possibly this explains what you have been seeing with the different test uploads. If you post an html but set the post up to save it as a bin, it will display as a bin type in the file system (eg. look with FTP). Only files with HTM(L) file types will in fact be parsed by the the web server - this is because if every thing is parsed, including images, any occurance of a special sequence (as used for controling dynamic infomation) in the images would be interpreted and then cause corruption of the image...
Regards
Mark