Solved

get http_accept_language

Posted on 2001-07-27
4
348 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 50 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month4 days, 11 hours left to enroll

635 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