1. A. What do the strings \"application/*\" and \"*/*\" signify in the Accept: h
ID: 3885948 • Letter: 1
Question
1. A. What do the strings "application/*" and "*/*" signify in the Accept: header?
B.What is the meaning of the "relative quality factor," q, associated with the various version of English?
C. What is the client's preferred version of English? What is the browser's least preferred version of English?
The HTTP GET message Consider the figure below, where a client is sending an HTTP GET message to a web server, gala.cs.umass.edu http message Internet host, running a web browser gaia.cs.umass.edu Web server Suppose the client-to-server HTTP GET message is the following: GET /kurose ross/interactive/quotation7.htm HTTP/1.1 Host: gaia.cs.umass.edu Accept: text/plain, text/html, text/xml, image/gif, image/png, audio/vnf.wave, audio/mp4, video/wmv, video/mp4, application/*, */* Accept-Language: ea-us, en-gbig-o.1, enag-o . 2 , fE-fest., , fi, AK, a If-Modified-Since: Thu, 14 Sep 2017 20:27:44 -0700 User Agent: Mozilla/5.0 (Windows NT 6.1; WoW64; rv:l1.0) Gecko/20100101 Firefox/11.0Explanation / Answer
NOTE: Please check the answers for the question and let me know if you have any questions. I will revert back within 24 hours.
A)
The character "*" is used to group media categories into ranges. Like type/* represents all subtypes of that type. For example application/* in this case indicates all subtypes of type application. Whereas */* represents all media types. For example,
Accept: text/plain, text/html, text/xml, application/*, */*
in the HTTP header indicates any application of type text and its subtypes like plain text, html and xml and other application type and its subtypes. Besides the mentioned types */* includes all media types.
B)
Relative quality factor q specifies what language the user prefers between the range of 0 to 1 where 0.001 is the least preferred and 1 is the most preferred. A value of 0 means not acceptable. If no q parameter is present the default weight is 1.
For example,
Accept: video/*; q=0.3, video/basic
can be interpreted as user prefer video/basic but requesting browser to send any video type if it is available with 70% mark-down in quality.
C) In the example below
Accept-Language: en-us, en-gb; q=0.1, en; q=0.2, fr, fr-ch
Accept-language header can actually help the requesting server the language user prefers. In this, it indicates US english is the client preferred version and if not available british english is preferred. It is followed by any type of english with 90% quality followed by french with 80% quality markdown. Here french is the least preferred version of client.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.