?
Solved

[delphi] how to read response headers

Posted on 2011-02-20
4
Medium Priority
?
907 Views
Last Modified: 2012-05-11
I using http in delphi. How can i read response headers?  from POST i send one post like this:
http.Post('http://www.plemiona.pl/index.php?action=login&server_pl51?', Input2, Output2);

Open in new window

 i need to get response location where i can find session. Please help me
0
Comment
Question by:l3m0n
[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
 

Author Comment

by:l3m0n
ID: 34937060
i used it:
memo2.Lines:=http.Response.RawHeaders;

Open in new window

but i get different information then fiddler shows:
i get:
Connection: keep-alive
X-Powered-By: PHP/5.2.0-8+etch16
Cache-Control: no-cache
Pragma: no-cache
Content-type: text/html; charset=utf-8
Content-Length: 24947
Date: Sun, 20 Feb 2011 12:40:47 GMT
Server: lighttpd/1.4.19

fiddler gets:
HTTP/1.1 302 Found
Transfer-Encoding: chunked
X-Powered-By: PHP/5.2.0-8+etch16
Location: http://pl51.plemiona.pl/login.php?sid=0bafb06d929c&secret=0&mobile_no_force=0
Content-Encoding: gzip
Vary: Accept-Encoding
Content-type: text/html; charset=utf-8
Date: Sun, 20 Feb 2011 12:33:46 GMT
Server: lighttpd/1.4.19

i have done:
http.allowcookies := true;
http.HandleRedirects:=true;
0
 
LVL 24

Expert Comment

by:jimyX
ID: 34937288
Try:
memo2.Lines := http.Response.ResponseText;

Open in new window

0
 

Author Comment

by:l3m0n
ID: 34937346
ResponseText? it store: "HTTP/1.0 200 OK"
0
 
LVL 21

Accepted Solution

by:
developmentguru earned 2000 total points
ID: 34943699
I am not sure how much help I can be with this but, in order to try, I would need ALL of the parameters you passed.  I would need to know how you setup to do this.  I would also (very important) need to know what version of Delphi you are using (I only have 2010 and XE).  If you have any information about what tools were used to put the other end together that could help as well.  In the last few releases Delphi's handling of SOME of the headers data has changed quite a bit.

Once you have given me this information, I will see if I can help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

800 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