Kirix Support Forums

Difference browser and HTTPRequest IDs

Please let us know if you are encountering problems with the beta or have ideas for how it can be improved. Please provide as much detail as possible so we can try to repeat the problem. Thanks!

Difference browser and HTTPRequest IDs

Postby BarthaziAndras on Wed Sep 19, 2007 8:15 am

Hi,

I've found a bug: HTTPRequest just doesn't sending a browser id at all. A typical log entry:

127.0.0.1 - - [19/Sep/2007:15:15:03 +0200] "GET /xxx HTTP/1.1" 200 5449 "-" "-"

Instead of something like:

127.0.0.1 - - [19/Sep/2007:15:15:03 +0200] "GET /xxx HTTP/1.1" 200 5449 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7"

The best would be, if the HTTPRequest would use the same id as the internal browser engine has. And just another idea: make it possible to override this default id, like:

var r = new HTTPRequest();
r.setClientId("Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7");
r.get("http://kirix.com/");

Andras
BarthaziAndras
Registered User
 
Posts: 9
Joined: Thu Sep 13, 2007 12:08 pm

Re: Difference browser and HTTPRequest IDs

Postby Aaron on Wed Sep 19, 2007 11:12 am

BarthaziAndras wrote:The best would be, if the HTTPRequest would use the same id as the internal browser engine has

Thanks for the suggestion!

BarthaziAndras wrote:And just another idea: make it possible to override this default id

As far as setting the HTTPRequest() agent, use the setUserAgent() function:

var http, result;
http = new HTTPRequest;
http.setUserAgent("Sample Agent");
result = http.get("http://my.sample.domain.com");

See here for the HTTPRequest documentation: http://www.kirix.com/docs/HTTPRequest.html

#352
Aaron Williams
Kirix Support Team
User avatar
Aaron
Kirix Support Team
 
Posts: 120
Joined: Fri Dec 16, 2005 3:01 pm

Return to Bug Reports & Suggestions