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

(TCO 2) Look at the captured Wireshark string of ASCII characters for an HTTP GE

ID: 3851086 • Letter: #

Question

(TCO 2) Look at the captured Wireshark string of ASCII characters for an HTTP GET message. Looking at the provided text, what is the preferred language for the response?


GET /cs453/index.html HTTP/1.1
Host: yahoo.business.com
User-Agent: Mozilla/5.0 (Windows;U; Windows NT 5.1; en-US; rv:1.7.2)
Gecko/20040804 Netscape/7.2 (ax)
Accept:ext/xml, application/xhtml+xml, text/html;q=0.9, text/plain;q=0.8, image/png,*/*;q=0.5
Accept-Language; fr, en;q=0.5
Accept-Encoding: zip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7
Keep-Alive: 300
Connection: keep-alive

Explanation / Answer

Solution :

Preferred language can be found out with attribute "Accept-Language":

- here value of Accept-Language is Accept-Language: fr, en;q=0.5

here ";q=0.5" is used to denote factor value. The value of q is always between 0 to 1 indicating 0 has lowest to 1 as highest weight/preference.

Here first language fr (France) is a preferred language but response can also be of type en(English) with priority 0.5.

Hence first preferred language is France and if France not available then English will be accepted.

if you have any doubts then you can ask in comment section.