<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Tim Miller</b> <span dir="ltr"><<a href="mailto:mille449@gmail.com">mille449@gmail.com</a>></span><br>Date: Fri, Oct 16, 2009 at 10:47 PM<br>
Subject: Re: [cse491] Lab 7 changes<br>To: Joe Amenta <<a href="mailto:amentajo@msu.edu">amentajo@msu.edu</a>><br><br><br>__main__ creates an instance of your webserve.Server class then calls Server.serve_forever(). That is all. The serve_forever() function will bind the port then enter the 'main' while loop to accept connections and pass them to handle_connection(). <br>
<br>If you look in the new test_webserve.py you can see how it will be called. Webserve_Test._run_fake_socket() is a replacement for our serve_forever() function, so our serve_forever() function should do the same thing but with a real socket.<br>
<br>Those are pretty much the same as before, most of the changes for the project come in the splitting up the parse_request() function into a wsgi app and the means to call it correctly. <br><font color="#888888"><br><br>
--tim</font><div><div></div><div class="h5"><br><br><br><br>
<div class="gmail_quote">On Fri, Oct 16, 2009 at 5:32 PM, Joe Amenta <span dir="ltr"><<a href="mailto:amentajo@msu.edu" target="_blank">amentajo@msu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Also, there's this in the lab notes:<br>
<br>
Next, get your 'server_forever' and __main__ code working (it should<br>
all still work as in HW #5).<br>
<font color="#888888"><br>
--Joe<br>
</font><div><div></div><div><br>
On Fri, Oct 16, 2009 at 5:31 PM, Joe Amenta <<a href="mailto:amentajo@msu.edu" target="_blank">amentajo@msu.edu</a>> wrote:<br>
> A little bit of an ambiguity... in the homework notes, you write:<br>
> Server.handle_forever() must bind to the given port and serve HTTP<br>
> requests on it forever, calling the WSGI app object for each request.<br>
><br>
> But in the lab notes, you write:<br>
> write a method 'Server.serve_forever()' that does your main while loop.<br>
> change your __main__ block to run Server.serve_forever() on the<br>
> appropriate port.<br>
><br>
> Which is it?<br>
><br>
> *ducks the shoe Titus is about to throw*<br>
><br>
> --Joe<br>
><br>
> On Fri, Oct 16, 2009 at 11:23 AM, C. Titus Brown <<a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a>> wrote:<br>
>><br>
>> thanks again!<br>
>><br>
>> On Thu, Oct 15, 2009 at 05:40:10PM -0400, Joe Amenta wrote:<br>
>> > Also, don't forget to change environ['wsgi_input'] to environ['wsgi.input'].<br>
>> ><br>
>> > --Joe<br>
>> ><br>
>> > On Thu, Oct 15, 2009 at 05:16:54PM -0400, Joe Amenta wrote:<br>
>> > > Don't forget to:<br>
>> > > --def WSGIApp(object) -> class WSGIApp(object)<br>
>> > > --return ['Hello, world'] -> return iter(['Hello, world'])<br>
>> > ><br>
>> > > --Joe<br>
>><br>
>> --<br>
>> C. Titus Brown, <a href="mailto:ctb@msu.edu" target="_blank">ctb@msu.edu</a><br>
><br>
<br>
_______________________________________________<br>
cse491-fall-2009 mailing list<br>
<a href="mailto:cse491-fall-2009@lists.idyll.org" target="_blank">cse491-fall-2009@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/cse491-fall-2009" target="_blank">http://lists.idyll.org/listinfo/cse491-fall-2009</a><br>
</div></div></blockquote></div><br>
</div></div></div><br>