Question:
Hello,
I have error, I am sending GET request (http.QuickGetObj) to the server. Set cookies by setting SetRequestHeader. But in logs I can see new line in Cookie header. Why? That's why I am getting error from the server. Please help. Example of the request you can see below.
--------- HTTP Request -----------
HttpRequest: GET /get.xml HTTP/1.1
Cookie: k=10.34.123.126.1345942272302036;
_sess="BAh7C........16b96"
Keep-Alive: 300
problem in adding quotes, _sess don't have quotes in original.
The automatic adding of quotes in the "Cookie" header name/value attribute pairs has already been fixed. It must be that you are not using the latest version (or you are using an older version from when it was fixed). Download and use the latest version.
The fact that the Cookie header is long and split onto more than a single line is not a problem. The header shown in your question above makes it difficult to see that there is actually a SPACE char leading the MIME continuation line. HTTP requests and responses are MIME, and the use of MIME continuation lines (i.e. folding/unfolding) should have no ill effect.
Hi, thank you for answer!
I have downloaded the latest version, but still having same problem.
What I can do wrong?
Maybe because in cookies too many parameters?
Please help :( You can see many quotes in request, I am using new version, .net 4.
GET /passport?mode=ckicheck&retpath=http%3A%2F%2Fdirect.yandex.ru%2Fregistered%2Fmain.pl%3Fcmd%3DeditCamp%26new_camp%3D1%26mediaType%3Dtext%26from%3Dfp_bbb&ncrnd=309325&idkey=10g1346098315HS1Mm7l94 HTTP/1.1
Cookie: yandexuid=6833068381346097059;
fuid01="503bcf9743b50612.1s9D0KW01jbA25pRkrafwOU4IHEXeNOuK6QQCZHkgKAjYzCI3jmklDCfzEBzHZm6_aTS4vIsncdK142zIjS4ILZ1xah7wcBM6mCMu6poGpg62ngsEMAiukEe-3rzA37d";
yandex_mail=doscocyniogfd; ys="udn.ZG9zY29jeW5pb2dmZA==";
yp="1661457115.udn.ZG9zY29jeW5pb2dmZA==";
yandex_login=doscocyniogfd;
sessionid2="2:1346097114.0.1.172846054.8:1346097114993:3253730843:16.1.1.1.1.86703.55238.9495ee8c1235674e03a19a9be5c0049b";
L="YWAyM3dbUl1NAWJddUlaDHxZem93e2JlFRVWNE19LxBaIQFbDjgAM3wETB1ITTpqCEkLJisFHQotVhhXNQUBOQ==.1346097115.9459.23429.0a4a9eab25c9042515caaecc8abf2506";
Session_id="1346097114.0.0.172846054.8:1346097114993:3253730843:16.86703.55238.cb454c1d14e1d2acb4dd335218995c86"
Keep-Alive: 300
Please capture the contents of the http.LastErrorText property after calling QuickGetObj. Then post it here. A line near the beginning should show the "DllDate", which should be a date in August of this year. If not, then you are not actually using the newest version.
Also, if you are using the newest version, please post the exact snippet of code required to reproduce the problem.
I have DllDate: Aug 5 2012
You can try next code:
Chilkat.Http http = new Chilkat.Http();
http.SetRequestHeader("Cookie", "yandexuid=6833068381346097059; fuid01=503bcf9743b50612.1s9D0KW01jbA25pRkrafwOU4IHEXeNOuK6QQCZHkgKAjYzCI3jmklDCfzEBzHZm6_aTS4vIsncdK142zIjS4ILZ1xah7wcBM6mCMu6poGpg62ngsEMAiukEe-3rzA37d; yandex_mail=doscocyniogfd; ys=udn.ZG9zY29jeW5pb2dmZA==; yp=1661457115.udn.ZG9zY29jeW5pb2dmZA==; yandex_login=doscocyniogfd; sessionid2=2:1346097114.0.1.172846054.8:1346097114993:3253730843:16.1.1.1.1.86703.55238.9495ee8c1235674e03a19a9be5c0049b; L=YWAyM3dbUl1NAWJddUlaDHxZem93e2JlFRVWNE19LxBaIQFbDjgAM3wETB1ITTpqCEkLJisFHQotVhhXNQUBOQ==.1346097115.9459.23429.0a4a9eab25c9042515caaecc8abf2506; Session_id=1346097114.0.0.172846054.8:1346097114993:3253730843:16.86703.55238.cb454c1d14e1d2acb4dd335218995c86");
var response = http.QuickGetObj("http://yandex.ru");
It will resume null, but in LastHeader you can find many quotes in Cookie Header
GET / HTTP/1.1
Cookie: yandexuid=6833068381346097059;
fuid01="503bcf9743b50612.1s9D0KW01jbA25pRkrafwOU4IHEXeNOuK6QQCZHkgKAjYzCI3jmklDCfzEBzHZm6_aTS4vIsncdK142zIjS4ILZ1xah7wcBM6mCMu6poGpg62ngsEMAiukEe-3rzA37d";
yandex_mail=doscocyniogfd; ys="udn.ZG9zY29jeW5pb2dmZA==";
yp="1661457115.udn.ZG9zY29jeW5pb2dmZA==";
yandex_login=doscocyniogfd;
sessionid2="2:1346097114.0.1.172846054.8:1346097114993:3253730843:16.1.1.1.1.86703.55238.9495ee8c1235674e03a19a9be5c0049b";
L="YWAyM3dbUl1NAWJddUlaDHxZem93e2JlFRVWNE19LxBaIQFbDjgAM3wETB1ITTpqCEkLJisFHQotVhhXNQUBOQ==.1346097115.9459.23429.0a4a9eab25c9042515caaecc8abf2506";
Session_id="1346097114.0.0.172846054.8:1346097114993:3253730843:16.86703.55238.cb454c1d14e1d2acb4dd335218995c86"
Accept: */*
Accept-Encoding: gzip
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
User-Agent: Chilkat/1.0.0 (+http://www.chilkatsoft.com/ChilkatHttpUA.asp)
Host: yandex.ru
Connection: Keep-Alive
Thanks, I see it was fixed in the Chilkat.HttpRequest.AddHeader method, but not in the Chilkat.Http.SetRequestHeader method. What programming language, operating system, architecture, etc. do you use? I'll make the fix, but I need to know what build to provide.
Just in case you need .NET, here are some new builds:
2.0/3.5 Framework: http://www.chilkatsoft.com/preRelease/ChilkatDotNet2.zip
4.0 Framework: http://www.chilkatsoft.com/preRelease/ChilkatDotNet4.zip
Thanks for fixing. I am using Windows Seven and .NET Framwork 4.0. I have downloaded the new build.