httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Lance Wilkinson" <>
Subject Re: [users@httpd] Android device ID not show on access_log
Date Fri, 07 Dec 2012 13:16:02 GMT
Chau Pham wrote:
> Thank you so much, both of you who answered me,
> I was wrong when not mentioned about the header.
> the header, it is "User-Agent" passed to apache server(version  2.2.15)
> in apache configuration, i used:
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" 
> " combined

	I use the same version of HTTPD.   MY log files, when I include that
	element in the LogFormat, present the entire string of the user agent
	(not a fragment in the middle like you're describing).   Are you
	examining the actual log files, or are you looking at something
	that has been run through a log file interpreter of some sort, since
	you're not only reporting not seeing the "device id" but also seem to
	suggest the user agent information logged doesn't have the prefixing
	"Mozilla/5.0" you're cited in your client side header.

	OR do you possibly have an intervening proxy or something that's
	replacing the User Agent being passed -- where does this
	"stagefright/1.2" you're citing come from instead of "Mozilla/5.0"?

	e.g., here's one of my log file entries for an Android client (edited
	to obscure privacy info and wrapped into xx lines to fit reasonable
	platen widths):

XX.XXX.XXX.XXX - - [29/Nov/2012:22:21:36 -0500]
	"GET /cgi-bin/fizzbin.php?card=qhears HTTP/1.1" 302 349
			"Mozilla/5.0 (Linux; U; Android 4.0.4; en-us; SGH-T999
				Build/IMM76D) AppleWebKit/534.30 (KHTML, like
					Gecko) Version/4.0 Mobile

	As you can see, Device ID is there in the raw log file.  My LogFormat
	directive is as follows (again, wrapped for clarity):

     "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

> The option "%{User-Agent}i" is to display header,
> it works fine for computer, laptop, and apple(iphone, ipad) device
> however when I use Android then access_log in service side prints out:
> - - [07/Dec/2012:13:29:37 +0900] "GET 
> /data/playgirls-14.ts HTTP/1.1" 200 2103156 "-" "stagefright/1.2 
> (Linux;Android 4.0.4)"
> - client side, the header is:
> Mozilla/5.0 (Linux; U; Android 4.0.4; ko-kr; SHW-M380W Build/IMM76D) 
> AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30

J.Lance Wilkinson ("Lance")		InterNet:
Systems Design Specialist - Lead	Phone: (814) 865-4870
Digital Library Technologies		FAX:   (814) 863-3560
E3 Paterno Library
Penn State University
University Park, PA 16802

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message