Grab the code from https://github.com/ctb/meep/tree/master/util/multi
git fetch git://github.com/ctb/meep.git master:multip
git checkout multip
and run it:
One uses threads to do parallel processing, the other uses processes (‘fork’).
(The second may not work on Windows, come to think of it.)
How does POST differ from GET?
Well, on one level, it’s really simple – just change forms to use
<FORM METHOD="POST" ...>
See: http://www.jmarshall.com/easy/http/#postmethod for server-side handling.
How does POST differ from GET (take 2)
Basically, for uploading files, you specify an encoding:
<FORM ENCTYPE="multipart/form-data" METHOD=POST>
and then the server needs to handle it specially.
Reading POST data
The improper way to read POST data is to do it all at once.
Why is this a problem?
A better way is to read it in a stream.
We’ll talk about this in class a bit.