<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CInternetSession + Cookies]]></title><description><![CDATA[<p>Hallo,<br />
die Klasse CInternetsession ist mir etwas zu fleißig. Ich will nicht, dass sie das Cookie-Management allein übernimmt. Ich möchte nur bestimmte Cookies senden.</p>
<p>Ich habe jetzt den Parameter &quot;INTERNET_FLAG_NO_COOKIES&quot; gefunden, mit dem ich Cookies deaktivieren kann. Das hat aber den Nachteil, dass auch die von mir manuell hinzugefügten Cookies nicht gesendet werden.</p>
<p>Wie kann ich das automatische Cookie-Management deaktivieren und trotzdem eigene Cookies senden?</p>
<p>Danke,<br />
Michael</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/193163/cinternetsession-cookies</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 12:26:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/193163.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 23 Sep 2007 09:16:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CInternetSession + Cookies on Sun, 23 Sep 2007 09:16:45 GMT]]></title><description><![CDATA[<p>Hallo,<br />
die Klasse CInternetsession ist mir etwas zu fleißig. Ich will nicht, dass sie das Cookie-Management allein übernimmt. Ich möchte nur bestimmte Cookies senden.</p>
<p>Ich habe jetzt den Parameter &quot;INTERNET_FLAG_NO_COOKIES&quot; gefunden, mit dem ich Cookies deaktivieren kann. Das hat aber den Nachteil, dass auch die von mir manuell hinzugefügten Cookies nicht gesendet werden.</p>
<p>Wie kann ich das automatische Cookie-Management deaktivieren und trotzdem eigene Cookies senden?</p>
<p>Danke,<br />
Michael</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1370937</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1370937</guid><dc:creator><![CDATA[miha]]></dc:creator><pubDate>Sun, 23 Sep 2007 09:16:45 GMT</pubDate></item><item><title><![CDATA[Reply to CInternetSession + Cookies on Sun, 23 Sep 2007 16:27:32 GMT]]></title><description><![CDATA[<p>Habe jetzt gesehen, dass ich mit ::InternetSetCookie Cookies setzten kann. Nur wie kann ich Cookies löschen?</p>
<p>Grüße,<br />
Michael</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371094</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371094</guid><dc:creator><![CDATA[miha]]></dc:creator><pubDate>Sun, 23 Sep 2007 16:27:32 GMT</pubDate></item><item><title><![CDATA[Reply to CInternetSession + Cookies on Sun, 23 Sep 2007 17:09:12 GMT]]></title><description><![CDATA[<p>Ich hoffe wirklich, dass mir bald jemand hilft!</p>
<p>Hier mein bisheriger Code:</p>
<pre><code class="language-cpp">bool CCommunicator::getURL(CString url, CString &amp;quellcode, CStringArray &amp;sourcecodeArray)
{
	bool				return_value = true;
	CString				somecode;      
    CInternetSession	session(&quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6&quot;,1,INTERNET_OPEN_TYPE_PRECONFIG);

	session.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 30000);
	session.SetOption(INTERNET_OPTION_CONNECT_RETRIES, 10);

	CString				strUrl(url);
	CStdioFile* pFile = NULL;

	try
	{  
           // Das hier funktioniert noch nicht
//	   ::HttpAddRequestHeaders( session, &quot;&quot;, strlen(&quot;&quot;), HTTP_ADDREQ_FLAG_REPLACE); 	 	  
           ::InternetSetCookie(url,&quot;meinCookie&quot;,&quot;seineDaten&quot;);

//		pFile = session.OpenURL(url,1,INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_TRANSFER_BINARY | INTERNET_FLAG_NO_COOKIES,NULL);
		pFile = session.OpenURL(url,1,INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_TRANSFER_BINARY,NULL);

		if(pFile)  
		{            
				while (pFile-&gt;ReadString(somecode) != NULL)  
				{  
					// String
					quellcode += somecode + &quot;\r\n&quot;;  

					// StringArray
					sourcecodeArray.Add(somecode);
				}

				pFile-&gt;Close(); 
				delete pFile;
		}
	}  
	catch (CInternetException* e)  
	{ 
		TCHAR szCause[255];

		e-&gt;GetErrorMessage(szCause, 255);
		e-&gt;Delete();

		quellcode = &quot;&quot;;
		sourcecodeArray.RemoveAll();

		return_value = false;
	}

	session.Close();
	CloseHandle(session);

	// 1. Ausnahmefehler
	if(quellcode.Find(&quot;The requested URL could not be retrieved&quot;)!=-1)
	return_value = false;

	// 2. Ausnahmefehler
	if(quellcode.Find(&quot;Service Unavailable&quot;)!=-1)
	return_value = false;

	return return_value;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1371120</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371120</guid><dc:creator><![CDATA[miha]]></dc:creator><pubDate>Sun, 23 Sep 2007 17:09:12 GMT</pubDate></item><item><title><![CDATA[Reply to CInternetSession + Cookies on Mon, 24 Sep 2007 20:53:48 GMT]]></title><description><![CDATA[<p>Kommt schon Leute. Lasst mich nicht hängen!</p>
<p>Ich habe für Win HTTP ::HttpAddRequestHeaders gefunden aber das klappt nicht bei meine Funktion (siehe oben).</p>
<p>Bitte helft mir!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1371990</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1371990</guid><dc:creator><![CDATA[miha]]></dc:creator><pubDate>Mon, 24 Sep 2007 20:53:48 GMT</pubDate></item><item><title><![CDATA[Reply to CInternetSession + Cookies on Mon, 24 Sep 2007 22:32:08 GMT]]></title><description><![CDATA[<p>ich würde libcurl verwenden :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1372031</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1372031</guid><dc:creator><![CDATA[kein hilfe]]></dc:creator><pubDate>Mon, 24 Sep 2007 22:32:08 GMT</pubDate></item><item><title><![CDATA[Reply to CInternetSession + Cookies on Tue, 25 Sep 2007 16:56:42 GMT]]></title><description><![CDATA[<p>Hallo &quot;kein hilfe&quot;,<br />
das war genau die richtige Hilfe <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
<p>Mit cURL konnte ich absolut alle Aufgaben erledigen, die mir bisher mit CInternetSession kopfzerbrechen bereitet haben.</p>
<p>Vielen DANK!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1372537</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1372537</guid><dc:creator><![CDATA[miha]]></dc:creator><pubDate>Tue, 25 Sep 2007 16:56:42 GMT</pubDate></item></channel></rss>