cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1466 Missing cookies

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Sun, 11 Jan 2015 22:40:54 +0000

- **labels**: --> cookies
- **assigned_to**: Daniel Stenberg
- **Comment**:

The Windows and the Linux builds use the exact same cookie code and logic... What if you send the Linux curl user-agent when using curl on windows?

---
** [bugs:#1466] Missing cookies**
**Status:** open
**Labels:** cookies 
**Created:** Wed Dec 31, 2014 03:31 AM UTC by Carlos Manuel
**Last Updated:** Tue Jan 06, 2015 10:34 PM UTC
**Owner:** Daniel Stenberg
On windows, executing the following command gives different results between different cURL versions.
Command: "curl --verbose --data "USERNAME=myusername&PASSWORD=mypassword" -c cookies.txt naxosmusiclibrary.com/action.Login.asp"
Using cURL-7.30.0 compiled with the flags vc-x86-release-static-ipv6-sspi-spnego-winssl gives me this:
~~~~~~
* Adding handle: conn: 0x79f920
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x79f920) send_pipe: 1, recv_pipe: 0
* About to connect() to naxosmusiclibrary.com port 80 (#0)
*   Trying 65.255.235.248...
* Connected to naxosmusiclibrary.com (65.255.235.248) port 80 (#0)
> POST /action.Login.asp HTTP/1.1
> User-Agent: curl/7.30.0
> Host: naxosmusiclibrary.com
> Accept: */*
> Content-Length: 27
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 27 out of 27 bytes
< HTTP/1.1 302
< Cache-Control: no-cache
< Content-Length: 0
< Content-Type: text/html
< Expires: Tue, 30 Dec 2014 03:10:14 GMT
< Location: default.asp?page_name=recentadditions
* Server Microsoft-IIS/7.5 is not blacklisted
< Server: Microsoft-IIS/7.5
* Added cookie dirpath="naxosmusiclibrary" for domain naxosmusiclibrary.com, path /, expire 0
< Set-Cookie: dirpath=naxosmusiclibrary; path=/
* Added cookie nmlsession="surl=False&subid=OFN0007641&mid=139609&mt=MM&cno=UVNMLpd06&sid=9A15EF05%2
D35CB%2D4E65%2DB200%2D9489BB08A02B" for domain naxosmusiclibrary.com, path /, expire 1420002616
< Set-Cookie: nmlsession=surl=False&subid=OFN0007641&mid=139609&mt=MM&cno=UVNMLpd06&sid=9A15EF05%2D3
5CB%2D4E65%2DB200%2D9489BB08A02B; expires=Wed, 31-Dec-2014 05:10:16 GMT; path=/
* Added cookie ASPSESSIONIDASCTDTCR="IJFLHJKAJHJEGCKDPPGPBHKO" for domain naxosmusiclibrary.com, pat
h /, expire 0
< Set-Cookie: ASPSESSIONIDASCTDTCR=IJFLHJKAJHJEGCKDPPGPBHKO; path=/
< X-Powered-By: ASP.NET
< X-NXS-HOST: 08
< P3P: CP="NON DSP COR ADMa DEVa OUR IND"
< Access-Control-Allow-Credentials: true
< Date: Wed, 31 Dec 2014 03:10:16 GMT
* Added cookie NMLhb="419754171.63937.4101712960.873531623" for domain naxosmusiclibrary.com, path /
, expire 0
< Set-Cookie: NMLhb=419754171.63937.4101712960.873531623; path=/
<
* Connection #0 to host naxosmusiclibrary.com left intact
~~~~~~
And the cookies are saved as expected:
~~~~~~
# Netscape HTTP Cookie File
# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
naxosmusiclibrary.com	FALSE	/	FALSE	0	dirpath	naxosmusiclibrary
naxosmusiclibrary.com	FALSE	/	FALSE	1420002616	nmlsession	surl=False&subid=OFN0007641&mid=139609&mt=MM&cno=UVNMLpd06&sid=9A15EF05%2D35CB%2D4E65%2DB200%2D9489BB08A02B
naxosmusiclibrary.com	FALSE	/	FALSE	0	ASPSESSIONIDASCTDTCR	IJFLHJKAJHJEGCKDPPGPBHKO
naxosmusiclibrary.com	FALSE	/	FALSE	0	NMLhb	419754171.63937.4101712960.873531623
~~~~~~
Version 7.39.0 with the flags vc-x86-release-static-ipv6-sspi-winssl gives the same output, but the cookie file has a missing cookie. The output is:
~~~~~~
* Hostname was NOT found in DNS cache
*   Trying 65.255.235.248...
* Connected to naxosmusiclibrary.com (65.255.235.248) port 80 (#0)
> POST /action.Login.asp HTTP/1.1
> User-Agent: curl/7.39.0
> Host: naxosmusiclibrary.com
> Accept: */*
> Content-Length: 27
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 27 out of 27 bytes
< HTTP/1.1 302
< Cache-Control: no-cache
< Content-Length: 0
< Content-Type: text/html
< Expires: Tue, 30 Dec 2014 03:19:20 GMT
< Location: default.asp?page_name=recentadditions
< Server: Microsoft-IIS/7.5
* Added cookie dirpath="naxosmusiclibrary" for domain naxosmusiclibrary.com, path /, expire 0
< Set-Cookie: dirpath=naxosmusiclibrary; path=/
* Added cookie nmlsession="surl=False&subid=OFN0007641&mid=139609&mt=MM&cno=UVNMLpd06&sid=D2672778%2
D1C29%2D4751%2DBA72%2DE12ECD89D20B" for domain naxosmusiclibrary.com, path /, expire 1420003160
< Set-Cookie: nmlsession=surl=False&subid=OFN0007641&mid=139609&mt=MM&cno=UVNMLpd06&sid=D2672778%2D1
C29%2D4751%2DBA72%2DE12ECD89D20B; expires=Wed, 31-Dec-2014 05:19:20 GMT; path=/
* Added cookie ASPSESSIONIDCQBRCTAR="HEDHNONAMNEAKDDOMIMDJJFL" for domain naxosmusiclibrary.com, pat
h /, expire 0
< Set-Cookie: ASPSESSIONIDCQBRCTAR=HEDHNONAMNEAKDDOMIMDJJFL; path=/
< X-Powered-By: ASP.NET
< X-NXS-HOST: 10
< P3P: CP="NON DSP COR ADMa DEVa OUR IND"
< Access-Control-Allow-Credentials: true
< Date: Wed, 31 Dec 2014 03:19:20 GMT
* Added cookie NMLhb="419754171.27330.4101712832.874079933" for domain naxosmusiclibrary.com, path /
, expire 0
< Set-Cookie: NMLhb=419754171.27330.4101712832.874079933; path=/
<
* Connection #0 to host naxosmusiclibrary.com left intact
~~~~~~
And produces the following cookie file:
~~~~~~
# Netscape HTTP Cookie File
# http://curl.haxx.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.
naxosmusiclibrary.com	FALSE	/	FALSE	0	dirpath	naxosmusiclibrary
naxosmusiclibrary.com	FALSE	/	FALSE	0	ASPSESSIONIDCQBRCTAR	HEDHNONAMNEAKDDOMIMDJJFL
naxosmusiclibrary.com	FALSE	/	FALSE	0	NMLhb	419754171.27330.4101712832.874079933
~~~~~~
The cookie "nmlsession" is missing. I suppose it's not the intended behaviour.
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2015-01-11

These mail archives are generated by hypermail.