Reputation: 177
If I write a simple http server in C. I can read http request through a file descriptor generated by accept()
function in a while loop. And I can send http response to client through that file descriptor.
In Django I know the HttpRequest
object will be passed to view function as a argument, but I want to know which function reads the HttpRequest
through the socket and generate a HttpRequest
object?
I know view function will return a HttpResponse
object. But which function will send the actual http response to the client?
And where is the while loop?
Upvotes: 1
Views: 229