<h3 dir="auto">Description</h3>
<p dir="auto">Incorrect ussage of meta tag "dont_merge_cookies" <a href="https://github.com/scrapy/scrapy/blob/8c3e5a2421f639f36e9b907d69d4d48b86447e68/scrapy/downloadermiddlewares/cookies.py#L53">here</a>, causes cookie application <a href="https://github.com/scrapy/scrapy/blob/8c3e5a2421f639f36e9b907d69d4d48b86447e68/scrapy/downloadermiddlewares/cookies.py#L58">here</a> to be skipped.<br>
This is in conflict with defined specs in <a href="https://docs.scrapy.org/en/latest/topics/request-response.html?highlight=dont_merge#std-reqmeta-dont_merge_cookies" rel="nofollow">docs</a>.</p>
<h3 dir="auto">Steps to Reproduce</h3>
<ol dir="auto">
<li>Create a simple spider performing a request with manually set cookies.</li>
<li>Enable CookieMiddleware</li>
<li>add "dont_merge_cookies: True" to the request meta</li>
<li>yield the request</li>
</ol>
<p dir="auto"><strong>Expected behavior:</strong> Request goes out with manual cookies and without stored cookies.</p>
<p dir="auto"><strong>Actual behavior:</strong> Request goes out without any cookies.</p>
<p dir="auto"><strong>Reproduces how often:</strong> 100%</p>
<h3 dir="auto">Versions</h3>
<p dir="auto">2.6.1</p>
<p dir="auto">This example is <a href="http://doc.scrapy.org/en/latest/topics/request-response.html#request-objects" rel="nofollow">straight from the documentation</a>, and does not work because if dont_merge_cookies is set on the request, then the cookie middleware skips all cookie processing and no cookies are ever set.</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Request(url=&quot;http://www.example.com&quot;,
        cookies={'currency': 'USD', 'country': 'UY'},
        meta={'dont_merge_cookies': True})"><pre class="notranslate"><span class="pl-v">Request</span>(<span class="pl-s1">url</span><span class="pl-c1">=</span><span class="pl-s">"http://www.example.com"</span>,
        <span class="pl-s1">cookies</span><span class="pl-c1">=</span>{<span class="pl-s">'currency'</span>: <span class="pl-s">'USD'</span>, <span class="pl-s">'country'</span>: <span class="pl-s">'UY'</span>},
        <span class="pl-s1">meta</span><span class="pl-c1">=</span>{<span class="pl-s">'dont_merge_cookies'</span>: <span class="pl-c1">True</span>})</pre></div>
<p dir="auto">Does not work, however, this does:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Request(url=&quot;http://www.example.com&quot;,
        cookies={'currency': 'USD', 'country': 'UY'})"><pre class="notranslate"><span class="pl-v">Request</span>(<span class="pl-s1">url</span><span class="pl-c1">=</span><span class="pl-s">"http://www.example.com"</span>,
        <span class="pl-s1">cookies</span><span class="pl-c1">=</span>{<span class="pl-s">'currency'</span>: <span class="pl-s">'USD'</span>, <span class="pl-s">'country'</span>: <span class="pl-s">'UY'</span>})</pre></div>