Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Modify the code to find out what the firefox browser and another browser will se

ID: 3792578 • Letter: M

Question

Modify the code to find out what the firefox browser and another browser
will send out in the header part of the HTTP request.

int main int argc, char argv[]) int ser rvSock Socket descriptor for server int clntSock Socket descriptor for client unsigned short echoser vPort Server port pid t processID Process ID from fork() unsigned int childProc Count 0 Number of child processes if (argc 2) 1 Test for correct number of arguments printf (stderr, "Usage: %s Server Port ", argvC0]); exit (1); echoserv Port atoi(argv[1]); First arg: local port er Socket (echo ServPort servSock Create TCPServ for G; Run forever clnt Sock Accept TTCPConn ection (servSock Fork child process and report any errors if process ID fork()) e) DiewithError ork faile d") else if (processID 0) If this is the child process close servSock Child closes parent socket Hand TCPClient (clntSock); exit (0) Child process terminates printf with child process %d n", int processID); close (clntSock); Parent closes child socket descriptor child ProcCount++; Increment number of outstanding child processes while (childProcCount) Clea n up all zombies processID id t -1, NUL WNOHANG Non-blocking wait waitpid((p if processID 0) waitpid() error? Die With Error waitpid() faile d") else if (processID 0) No zombie to wait on break; else child Proccount--; Cleaned u after a child NOT REACHED

Explanation / Answer

1.For Mozilla Firefox I have submitted a code in Java for your reference.

2.for opera browser plz change the arguments of

conn.setRequestProperty(" "," ") to the code below

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote