Illegal 'User-Agent' header in Stream Collector


#1

Hi there, we’ve got the real time pipeline set up which is working beautifully but we’re seeing a fair bit of " [scala-stream-collector-akka.actor.default-dispatcher-9] WARN s.can.server.HttpServerConnection - Illegal request header: Illegal ‘User-Agent’ header: Invalid input ‘[’, expected ’ ', ‘\t’, LWS, Comment or ProductVersionComment " errors in the Collector log, caused by user agents with “FB_IAB” or “FBAN” which are for the Facebook App on iOS and Android
Does that mean we’re missing data? Any suggestion on how to fix the issue?
See below for some examples of the user agents causing trouble, thanks a lot!

> 00:58:02.290 [scala-stream-collector-akka.actor.default-dispatcher-9] WARN  s.can.server.HttpServerConnection - Illegal request header: Illegal 'User-Agent' header: Invalid input '[', expected ' ', '\t', LWS, Comment or ProductVersionComment (line 1, pos 156):
> Mozilla/5.0 (Linux; Android 6.0.1; SM-G930F Build/MMB29K; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/53.0.2785.124 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/103.0.0.20.72;]
>                                                                                                                                                            ^

> 00:58:02.367 [scala-stream-collector-akka.actor.default-dispatcher-9] WARN  s.can.server.HttpServerConnection - Illegal request header: Illegal 'User-Agent' header: Invalid input '[', expected ' ', '\t', LWS, Comment or ProductVersionComment (line 1, pos 113):
> Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Mobile/14A456 [FBAN/FBIOS;FBAV/60.0.0.37.141;FBBV/34183777;FBRV/0;FBDV/iPhone8,1;FBMD/iPhone;FBSN/iPhone OS;FBSV/10.0.2;FBSS/2;FBCR/OPTUS;FBID/phone;FBLC/en_GB;FBOP/5]
>                                                                                                                 ^

> 00:58:02.842 [scala-stream-collector-akka.actor.default-dispatcher-5] WARN  s.can.server.HttpServerConnection - Illegal request header: Illegal 'User-Agent' header: Invalid input '[', expected ' ', '\t', LWS, Comment or ProductVersionComment (line 1, pos 101):
> Mozilla/5.0 (iPad; CPU OS 7_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Mobile/11D167 [FBAN/FBIOS;FBAV/62.0.0.43.141;FBBV/36454510;FBRV/0;FBDV/iPad2,5;FBMD/iPad;FBSN/iPhone OS;FBSV/7.1;FBSS/1;FBCR/;FBID/tablet;FBLC/en_GB;FBOP/5]

#2

If anyone is wondering about similar logs, nothing to worry about, just Facebook not respecting user-agent RFC: https://github.com/snowplow/snowplow/issues/2970