Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

get http_accept_language

Posted on 2001-07-27
4
Medium Priority
?
353 Views
Last Modified: 2007-12-19
How to do something like request.servervariables['http_accept_language']?

Looks like it's missing!

Note : I don't want to use anything like CGIExpert, or like it. Just pure Delphi.


Thanks
0
Comment
Question by:feup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 21

Expert Comment

by:ziolko
ID: 6339482
Try Request.GetFieldByName('http...');
ziolko.
0
 
LVL 21

Accepted Solution

by:
ziolko earned 200 total points
ID: 8730057
function TWebModule1.Headers:string;
begin
  Result:='Request headers: '+'<BR>';
  Result:=Result+'APPL_MD_PATH '+Request.GetFieldByName('APPL_MD_PATH')+'<BR>';
  Result:=Result+'APPL_PHYSICAL_PATH '+Request.GetFieldByName('APPL_PHYSICAL_PATH')+'<BR>';
  Result:=Result+'AUTH_PASSWORD '+Request.GetFieldByName('AUTH_PASSWORD')+'<BR>';
  Result:=Result+'AUTH_TYPE '+Request.GetFieldByName('AUTH_TYPE')+'<BR>';
  Result:=Result+'AUTH_USER '+Request.GetFieldByName('AUTH_USER')+'<BR>';
  Result:=Result+'CERT_COOKIE '+Request.GetFieldByName('CERT_COOKIE')+'<BR>';
  Result:=Result+'CERT_FLAGS '+Request.GetFieldByName('CERT_FLAGS')+'<BR>';
  Result:=Result+'CERT_ISSUER '+Request.GetFieldByName('CERT_ISSUER')+'<BR>';
  Result:=Result+'CERT_KEYSIZE '+Request.GetFieldByName('CERT_KEYSIZE')+'<BR>';
  Result:=Result+'CERT_SECRETKEYSIZE '+Request.GetFieldByName('CERT_SECRETKEYSIZE')+'<BR>';
  Result:=Result+'CERT_SERIALNUMBER '+Request.GetFieldByName('CERT_SERIALNUMBER')+'<BR>';
  Result:=Result+'CERT_SERVER_ISSUER '+Request.GetFieldByName('CERT_SERVER_ISSUER')+'<BR>';
  Result:=Result+'CERT_SERVER_SUBJECT '+Request.GetFieldByName('CERT_SERVER_SUBJECT')+'<BR>';
  Result:=Result+'CERT_SUBJECT '+Request.GetFieldByName('CERT_SUBJECT')+'<BR>';
  Result:=Result+'CONTENT_LENGTH '+Request.GetFieldByName('CONTENT_LENGTH')+'<BR>';
  Result:=Result+'CONTENT_TYPE '+Request.GetFieldByName('CONTENT_TYPE')+'<BR>';
  Result:=Result+'HTTPS '+Request.GetFieldByName('HTTPS')+'<BR>';
  Result:=Result+'HTTPS_KEYSIZE '+Request.GetFieldByName('HTTPS_KEYSIZE')+'<BR>';
  Result:=Result+'HTTPS_SECRETKEYSIZE '+Request.GetFieldByName('HTTPS_SECRETKEYSIZE')+'<BR>';
  Result:=Result+'HTTPS_SERVER_ISSUER '+Request.GetFieldByName('HTTPS_SERVER_ISSUER')+'<BR>';
  Result:=Result+'HTTPS_SERVER_SUBJECT '+Request.GetFieldByName('HTTPS_SERVER_SUBJECT')+'<BR>';
  Result:=Result+'INSTANCE_ID '+Request.GetFieldByName('INSTANCE_ID')+'<BR>';
  Result:=Result+'INSTANCE_META_PATH '+Request.GetFieldByName('INSTANCE_META_PATH')+'<BR>';
  Result:=Result+'LOCAL_ADDR '+Request.GetFieldByName('LOCAL_ADDR')+'<BR>';
  Result:=Result+'LOGON_USER '+Request.GetFieldByName('LOGON_USER')+'<BR>';
  Result:=Result+'PATH_INFO '+Request.GetFieldByName('PATH_INFO')+'<BR>';
  Result:=Result+'PATH_TRANSLATED '+Request.GetFieldByName('PATH_TRANSLATED')+'<BR>';
  Result:=Result+'QUERY_STRING '+Request.GetFieldByName('QUERY_STRING')+'<BR>';
  Result:=Result+'REMOTE_ADDR '+Request.GetFieldByName('REMOTE_ADDR')+'<BR>';
  Result:=Result+'REMOTE_HOST '+Request.GetFieldByName('REMOTE_HOST')+'<BR>';
  Result:=Result+'REMOTE_PORT '+Request.GetFieldByName('REMOTE_PORT')+'<BR>';
  Result:=Result+'REMOTE_USER '+Request.GetFieldByName('REMOTE_USER')+'<BR>';
  Result:=Result+'REQUEST_METHOD '+Request.GetFieldByName('REQUEST_METHOD')+'<BR>';
  Result:=Result+'SCRIPT_NAME '+Request.GetFieldByName('SCRIPT_NAME')+'<BR>';
  Result:=Result+'SERVER_NAME '+Request.GetFieldByName('SERVER_NAME')+'<BR>';
  Result:=Result+'SERVER_PORT '+Request.GetFieldByName('SERVER_PORT')+'<BR>';
  Result:=Result+'SERVER_PORT_SECURE '+Request.GetFieldByName('SERVER_PORT_SECURE')+'<BR>';
  Result:=Result+'SERVER_PROTOCOL '+Request.GetFieldByName('SERVER_PROTOCOL')+'<BR>';
  Result:=Result+'SERVER_SOFTWARE '+Request.GetFieldByName('SERVER_SOFTWARE')+'<BR>';
  Result:=Result+'URL '+Request.GetFieldByName('URL')+'<BR>';
  Result:=Result+'--------------------------------------RAW_DATA-------------------------<BR>';
  Result:=Result+'ALL_RAW '+Request.GetFieldByName('ALL_RAW')+'<BR>';
  if Pos('Windows CE',Request.GetFieldByName('ALL_RAW')) > 0 then
    Result:=Result+'Windows CE based system <BR>'
  else
    Result:=Result+'Windows based system <BR>';
  if Pos('240x320',Request.GetFieldByName('ALL_RAW')) > 0 then
    Result:=Result+'Device is <B>iPAQ</B> <BR>'
  else
    Result:=Result+'Device is <B>Desktop</B> <BR>';
end;

procedure TWebModule1.WebModule1headersAction(Sender: TObject;
  Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
  Response.Content:=Headers;
  Handled:=True;
end;

ziolko.
0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8734943
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept ziolko's comment as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question