Project

General

Profile

Actions

Bug #6663

closed

Metacat does not record http request "User-Agent" into the event log

Added by Peter Slaughter almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
metacat
Target version:
Start date:
02/06/2015
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:

Description

All entries in the 'access_log' table on KNB have user_agent equal to NULL, i.e. the query
"select count(*) from access_log where user_agent IS NOT NULL;" returns 0. In MetacatHandler.readFromMetacat,
for example, userAgent is passed to EventLog but nulls are being recorded.

Actions #1

Updated by Jing Tao almost 10 years ago

  • Assignee changed from ben leinfelder to Jing Tao
Actions #2

Updated by Jing Tao almost 10 years ago

It turned out the constructor of EventLogData class didn't have the field for user-agent.

I found the user-agent can be very long. For example, it is "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36" for using Chrome browser to get an object.

In our access_log table, the length of the column of user_agent is 512. So I will add a check to the user agent before we write it to database, if its length is less than or equals 512, we will write all of them to database; otherwise, we only write first 512 characters.

Actions #3

Updated by Jing Tao almost 10 years ago

  • Status changed from New to Resolved

The source and test code was committed to both trunk and 2.4 branch.

Actions #4

Updated by Jing Tao almost 10 years ago

  • Target version changed from 2.5.0 to 2.4.3
Actions

Also available in: Atom PDF