jumaris / indyproject

Automatically exported from code.google.com/p/indyproject
0 stars 0 forks source link

Add global variable for default UserAgent #284

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add a public global variable in IdHTTPHeaderInfo.pas to replace the non-public 
DefaultUserAgent constant.

This would allow changing the default UserAgent on a program-wide basis so that 
all dynamically created TIdHTTP objects will have the same UserAgent by 
default.  This saves some lines of codes and avoids forgetting to set it for 
some objects.

It is useful to change the UserAgent because some servers blacklist requests 
from Indy's default UserAgent due to spammers who use Indy.

Original issue reported on code.google.com by gambit47 on 3 Apr 2014 at 8:31

GoogleCodeExporter commented 9 years ago
A new GIdDefaultUserAgent global variable has been added to 
IdHTTPHeaderInfo.pas in SVN rev 5126.

Original comment by gambit47 on 8 Apr 2014 at 1:56