Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Special character in TStringList

Status
Not open for further replies.

Jack37

Technical User
Apr 24, 2011
1
0
0
SK
Hello. I have a problem with TStringList, more exactly storing ">" inside string.
I need this to work with Indy HTTP, POST list of parameters to server

Code:
Items:=TStringList.Create;
Items.Clear;
Items.Add('name=test');
Items.Add('pass=>A');

http.Post('ip here',Items);

When I look into list with Items[1],
"pass=>A" is converted to "pass=%3EA"

How to keep it ">A" so it POST the right pass?
 
%3E is correct notation for > when it comes to data associated with a URI. If you are going to work with internet related protocols, this conversion is generally the norm as it is required to pass the data properly. Indy HTTP will make this conversion because 99.99% of the time it is required anyway.

If you are having problems with the system not recognizing this name & password pair, you will need to see if the object represented by "http.post()" has an option to disable URI dereferencing. But this will cause a number of problems as well, so tread lightly.

The likely option, if nothing else works, is to disable any possibility of the use of URI converted characters in your passwords or user names.

It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top