Solved

[delphi] how to read response headers

Posted on 2011-02-20
4
813 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 500 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

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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