+ if (p_sys->psz_user_agent)
+ {
+ for( char *p = p_sys->psz_user_agent; *p; p++ )
+ {
+ uint8_t c = *p;
+ if( c < 32 || strchr( "()<>@,;:\\\"[]?={}", c ) )
+ *p = '_'; /* remove potentially harmful characters */
+ }
+ }
+
+ /* HTTP referrer */
+ p_sys->psz_referrer = var_InheritString( p_access, "http-referrer" );