vendredi 26 octobre 2018

In csapp, what is the read_requesthdrs() function effect?

In csapp, there is a project called tiny web, in the source code, the sever reads request line from sockfd, then it calls read_requesthdrs() to remove request headers from socket receive buffer. The book explains the server doesn't need these header information.

My question:
Why does the server need to remove these headers?
I comment this function, that mean the headers still in the receive buffer, but the browser can still get the resource files from server. Does anyone know the reason?

enter image description here




Aucun commentaire:

Enregistrer un commentaire