![EBK COMPUTER NETWORKING](https://www.bartleby.com/isbn_cover_images/8220102955479/8220102955479_largeCoverImage.jpg)
- a)
HTTP:
The web application uses Hyper Text Transfer Protocol (HTTP) as application layer protocol.
HTTP is an application protocol for distributive, collaborative, and hypermedia
Given HTTP GET Message:
GET /cs453/index.html HTTP/1.1<cr>
<lf>Host: gai a.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0
( Windows;U; Windows NT 5.1; en-US; rv:1.7.2)
Gec ko/20040804 Netscape/7.2 (ax)
<cr><lf>Accept:ex t/xml, application/xml,
application/xhtml+xml, text /html;q=0.9,
text/plain;q=0.8,image/png,*/*;q=0.5
<cr><lf>Accept-Language: en- s,en;q=0.5<cr>
<lf>Accept- Encoding: zip,deflate<cr>
<lf>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;
q=0.7<cr><lf>Keep-Alive: 300<cr>
<lf>Connection:keep-alive<cr><lf><cr><lf>
- b)
HTTP:
The web application uses Hyper Text Transfer Protocol (HTTP) as application layer protocol.
HTTP is an application protocol for distributive, collaborative, and hypermedia information systems
Given HTTP GET Message:
GET /cs453/index.html HTTP/1.1<cr>
<lf>Host: gai a.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0
( Windows;U; Windows NT 5.1; en-US; rv:1.7.2)
Gec ko/20040804 Netscape/7.2 (ax)
<cr><lf>Accept:ex t/xml, application/xml,
application/xhtml+xml, text /html;q=0.9,
text/plain;q=0.8,image/png,*/*;q=0.5
<cr><lf>Accept-Language: en- s,en;q=0.5<cr>
<lf>Accept- Encoding: zip,deflate<cr>
<lf>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;
q=0.7<cr><lf>Keep-Alive: 300<cr>
<lf>Connection:keep-alive<cr><lf><cr><lf>
- c)
HTTP:
The web application uses Hyper Text Transfer Protocol (HTTP) as application layer protocol.
HTTP is an application protocol for distributive, collaborative, and hypermedia information systems
Given HTTP GET Message:
GET /cs453/index.html HTTP/1.1<cr>
<lf>Host: gai a.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0
( Windows;U; Windows NT 5.1; en-US; rv:1.7.2)
Gec ko/20040804 Netscape/7.2 (ax)
<cr><lf>Accept:ex t/xml, application/xml,
application/xhtml+xml, text /html;q=0.9,
text/plain;q=0.8,image/png,*/*;q=0.5
<cr><lf>Accept-Language: en- s,en;q=0.5<cr>
<lf>Accept- Encoding: zip,deflate<cr>
<lf>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;
q=0.7<cr><lf>Keep-Alive: 300<cr>
<lf>Connection:keep-alive<cr><lf><cr><lf>
- d)
HTTP:
The web application uses Hyper Text Transfer Protocol (HTTP) as application layer protocol.
HTTP is an application protocol for distributive, collaborative, and hypermedia information systems
Given HTTP GET Message:
GET /cs453/index.html HTTP/1.1<cr>
<lf>Host: gai a.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0
( Windows;U; Windows NT 5.1; en-US; rv:1.7.2)
Gec ko/20040804 Netscape/7.2 (ax)
<cr><lf>Accept:ex t/xml, application/xml,
application/xhtml+xml, text /html;q=0.9,
text/plain;q=0.8,image/png,*/*;q=0.5
<cr><lf>Accept-Language: en- s,en;q=0.5<cr>
<lf>Accept- Encoding: zip,deflate<cr>
<lf>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;
q=0.7<cr><lf>Keep-Alive: 300<cr>
<lf>Connection:keep-alive<cr><lf><cr><lf>
- e)
HTTP:
The web application uses Hyper Text Transfer Protocol (HTTP) as application layer protocol.
HTTP is an application protocol for distributive, collaborative, and hypermedia information systems
Given HTTP GET Message:
GET /cs453/index.html HTTP/1.1<cr>
<lf>Host: gai a.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0
( Windows;U; Windows NT 5.1; en-US; rv:1.7.2)
Gec ko/20040804 Netscape/7.2 (ax)
<cr><lf>Accept:ex t/xml, application/xml,
application/xhtml+xml, text /html;q=0.9,
text/plain;q=0.8,image/png,*/*;q=0.5
<cr><lf>Accept-Language: en- s,en;q=0.5<cr>
<lf>Accept- Encoding: zip,deflate<cr>
<lf>Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;
q=0.7<cr><lf>Keep-Alive: 300<cr>
<lf>Connection:keep-alive<cr><lf><cr><lf>
![Check Mark](/static/check-mark.png)
Want to see the full answer?
Check out a sample textbook solution![Blurred answer](/static/blurred-answer.jpg)
Chapter 2 Solutions
EBK COMPUTER NETWORKING
- In Java: The CSV (or comma-separated values) format is commonly used for tabular data. Each table row is a line, with columns separated by commas. Items may be enclosed in quotation marks, and they must be if they contain commas or quotation marks. Quotation marks inside quoted fields are doubled. Here is a line with four fields:1729, San Francisco, "Hello, World", "He asked: ""Quo vadis?""" Implement a class CSVReader that reads a CSV file, and provide methodsint numberOfRows()int numberOfFields(int row)String field(int row, int column)arrow_forwardWrite a program that reads movie data from a CSV (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the CSV file and outputs the contents according to the following requirements: Each row contains the title, rating, and all showtimes of a unique movie. A space is placed before and after each vertical separator ('|') in each row. Column 1 displays the movie titles and is left justified with a minimum of 44 characters. If the movie title has more than 44 characters, output the first 44 characters only. Column 2 displays the movie ratings and is right justified with a minimum of 5 characters. Column 3 displays all the showtimes of the same movie, separated by a space. Each row of the CSV file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows. Hints: Use the find() function to find the index of a comma in each row of…arrow_forwardMake a php web page that prompts the user for a phone number. The web page should display a message whether it is a valid phone number entry or not. Write a function that uses regular expression that flexibly matches a U.S. phone number whether or not it has parentheses around the area code and has its parts seperate by spaces, hyphens, or peroids. The regular expression should match phone numbers written like this: (718) 498-1043(718) 498 1043718 498 1043718 498-1043718-498-1043718.498.1043arrow_forward
- Programing C Ask for the full name of a single person. The guidelines are: • First ask the user for an estimate of how large the name will be. • Second, ask the user for the full name in one single line. Third, ensure the full name doesn't surpass the length given in step 1. If it does, stop the scanning of the name, assign the null character to the last element in the string and display a message to the user. • Fourth, print out the full name. Make sure white spaces are included. • Your program should at least have one more function besides main. Example of the output: What is the estimated length of the Full Name? 11 Please input the Full Name: Kyle Smith Full Name is: Kyle Smith What is the estimated length of the Full Name? 8 Please input the Full Name: Kyle Smith The length of your string has reached the max length. Try again with a larger length. Full Name is: Kyle Smarrow_forwardthis is for javaScriptDisplay "bad request" if the response's status is 400. Otherwise, display "not bad request". function responseReceivedHandler() { } var xhr = new XMLHttpRequest();xhr.addEventListener("load", responseReceivedHandler);xhr.addEventListener("error", responseReceivedHandler);xhr.open("GET", "https://wp.zybooks.com/weather.php?zip=90210");xhr.send();arrow_forwardWrite a function that converts encoded HTML into actual HTML. The function will take a string of text, and then a hashmap, mapping html tags to a list of tuples, where each tuple represents the first and last index of the string that the tags need to encompassarrow_forward
- Generate a histogram of 20,000 randomly generated floating-point numbers according to a uniform distribution with a user-specified range [a, b], where a and b are parameters. The histogram will include the frequencies of numBins (>=21) values equal-width data bins that are equally evenly distributed between a and b. For instance, if a=2.0, b=10.0, you will calculate the frequencies total number of randomly generated values that fall into each of following data bins, where each bin has a width of (b-a)/21 and centers at 2.0, 2.0+(8.0/20)*1, 2.0+(8.0/20)*2, 2.0+(8.0/20)*3, ..., 2.0+(8.0/20)*20=10, respectively. To keep it simple, your can set the precision of each center at 0.1 (i.e., only consider the first digit after the decimal point, e.g., 2.0, 2.4, 2.8, etc.). Put all the above together, if the randomly generated value is 2.44323, it falls into the bin centering at 2.4 since rounding 2.44323 with a precision of 0.1 is 2.4.arrow_forwardPlease give me the output code in python to the following scenario: Implement function links() that takes as input the name of an HTML file (as a string) and returns the number of hyperlinks in that file. To do this you will assume that each hyperlink appears in an anchor tag. You also need to know that every anchor tag ends with the substring</a>arrow_forwardWrite a program that reads in a line consisting of a student’s name, Social Security number, user ID, and password. The program outputs the string in which all the digits of the Social Security number and all the characters in the password are replaced by x. (The Social Security number is in the form 000-00-0000, and the user ID and the password do not contain any spaces.) Your program should not use the operator [] to access a string element. Use the appropriate functions described in Table 7-1 below. Expression Effect strVar.at(index) Returns the element at the position specified by index strVar[index] Returns the element at the position specified by index strVar.append(n, ch) Appends n copies of ch to strVar, where ch is a char variable or a char constant strVar.append(str) Appends str to strVar strVar.clear() Deletes all the characters in strVar strVar.compare(str) Returns 1 if strVar > str returns 0 if strVar == str; returns −1 if strVar < str…arrow_forward
- Write a program that reads movie data from a csv (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the csv file and outputs the contents according to the following requirements: Each row contains the title, rating, and all showtimes of a unique movie. A space is placed before and after each vertical separator (|) in each row. Column 1 displays the movie titles and is left justified with a minimum of 44 characters. If the movie title has more than 44 characters, output the first 44 characters only. Column 2 displays the movie ratings and is right justified with a minimum of 5 characters. Column 3 displays all the showtimes of the same movie, separated by a space. Each row of the csv file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows. Ex: If the input of the program is: movies.csv and the contents of movies.csv…arrow_forwardWrite a program that reads movie data from a csv (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the csv file and outputs the contents according to the following requirements: Each row contains the title, rating, and all showtimes of a unique movie. A space is placed before and after each vertical separator (|) in each row. Column 1 displays the movie titles and is left justified with a minimum of 44 characters. If the movie title has more than 44 characters, output the first 44 characters only. Column 2 displays the movie ratings and is right justified with a minimum of 5 characters. Column 3 displays all the showtimes of the same movie, separated by a space. Each row of the csv file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows. Ex: If the input of the program is: movies.csv and the contents of movies.csv…arrow_forwardPlease do in Java In many computer systems and networks,different users are granted different levels of access to different resources. In this case, you are given a int[] rights, indicating the privilege level of each user to use some system resource. You are also given a int minPermission, which is the minimum permission a user must have to use this resource. You are to return a String indicating which users can and cannot access this resource. Each character in the return value corresponds to the element of users with the same index. 'A' indicates the user is allowed access, while 'D' indicates the user is denied access. Constraints users will contain between 0 and 50 elements, inclusive. Each element of users will be between 0 and 100, inclusive. minPermission will be between 0 and 100, inclusive. Examples a) {0,1,2,3,4,5} 2 Returns: "DDAAAA" Here, the first two users don't have sufficient privileges, but the remainder do. b) {5,3,2,10,0} 20 Returns: "DDDDD"…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
![Text book image](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)