Question 29
Scenario 3:
You are provided with a Gzipped Apache log file from a website having the below data in each row.
The fields are separated by spaces and quoted by double quotes ("). Unlike CSV files, quoted fields are escaped via " and not". All data is in the GMT-0500 timezone and the questions were based in this same time zone.
Use the information and answer the given sub-questions.
Note: Assume that you are using Python codes for log analysis
How would you identify if the log entry’s HTTP status code indicates a redirection request? (Assume that status is correctly stored in the variable ‘status’)
status in [301, 302, 303]
200 < status < 400
300 <= status < 400
status in range(299, 400)