bruce
2018-07-14 18:30:11 UTC
Hi.
Trying to understand why I'm getting what appears to be different
values (for request cookies) from the browser (FF) and the cmdline
curl (centos).
I'm using the url
https://smccis.smc.edu/smcweb/f?p=118:1:1099677479717
In the browser, I examine the firebug network/cookies data and I get:
-ORA_WWV_APP_118:"ORA_WWV-jMu08G5jY_5pTpZnTfWHF7RX"
-ORA_WWV_USER_61917392119870:"ORA_WWV-IAmUD0LPRXrHnrE6LuZj7pJM"
-_ga:"GA1.2.1168176653.1531572004"
-_gid:"GA1.2.232116952.1531572004"
I then copy the "cURL" cmd from the firebug dialog, which results in:
curl 'https://smccis.smc.edu/smcweb/f?p=118:1:1099677479717' -H 'Host:
smccis.smc.edu' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:52.0) Gecko/20100101 Firefox/52.0' -H 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H
'Accept-Language: en-US,en;q=0.5' --compressed -H 'Cookie:
ORA_WWV_APP_118=ORA_WWV-jMu08G5jY_5pTpZnTfWHF7RX;
ORA_WWV_USER_61917392119870=ORA_WWV-IAmUD0LPRXrHnrE6LuZj7pJM;
_ga=GA1.2.1168176653.1531572004; _gid=GA1.2.232116952.1531572004' -H
'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1'
Running this curl cmd from the cmdline the resulting content is the
same as the browser source code.
However, when I change the curl cmd to use cookie/cookie-jar, I don't
get the same cookies!!!
curl -L 'https://smccis.smc.edu/smcweb/f?p=118:1:1099677479717' -H
'Host: smccis.smc.edu' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:52.0) Gecko/20100101 Firefox/52.0' -H 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H
'Accept-Language: en-US,en;q=0.5' --compressed --cookie-jar a.lwp
--cookie a.lwp -H 'Connection: keep-alive' -H
'Upgrade-Insecure-Requests: 1'
Given that this is the 1st url of the site, I would expect to get the
exact same request cookies.
So I'm trying to understand what's going on, and how I can generate
"both" cookies using the cmdline curl to have the same response
cookies as the browser.
My reason for trying to get the cookies in the external cookie file -
to be able to pass/use the cookies in subsequent "curl" cmds from the
cmdline.
thoughts/comments???
thanks!
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:
Trying to understand why I'm getting what appears to be different
values (for request cookies) from the browser (FF) and the cmdline
curl (centos).
I'm using the url
https://smccis.smc.edu/smcweb/f?p=118:1:1099677479717
In the browser, I examine the firebug network/cookies data and I get:
-ORA_WWV_APP_118:"ORA_WWV-jMu08G5jY_5pTpZnTfWHF7RX"
-ORA_WWV_USER_61917392119870:"ORA_WWV-IAmUD0LPRXrHnrE6LuZj7pJM"
-_ga:"GA1.2.1168176653.1531572004"
-_gid:"GA1.2.232116952.1531572004"
I then copy the "cURL" cmd from the firebug dialog, which results in:
curl 'https://smccis.smc.edu/smcweb/f?p=118:1:1099677479717' -H 'Host:
smccis.smc.edu' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:52.0) Gecko/20100101 Firefox/52.0' -H 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H
'Accept-Language: en-US,en;q=0.5' --compressed -H 'Cookie:
ORA_WWV_APP_118=ORA_WWV-jMu08G5jY_5pTpZnTfWHF7RX;
ORA_WWV_USER_61917392119870=ORA_WWV-IAmUD0LPRXrHnrE6LuZj7pJM;
_ga=GA1.2.1168176653.1531572004; _gid=GA1.2.232116952.1531572004' -H
'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1'
Running this curl cmd from the cmdline the resulting content is the
same as the browser source code.
However, when I change the curl cmd to use cookie/cookie-jar, I don't
get the same cookies!!!
curl -L 'https://smccis.smc.edu/smcweb/f?p=118:1:1099677479717' -H
'Host: smccis.smc.edu' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:52.0) Gecko/20100101 Firefox/52.0' -H 'Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H
'Accept-Language: en-US,en;q=0.5' --compressed --cookie-jar a.lwp
--cookie a.lwp -H 'Connection: keep-alive' -H
'Upgrade-Insecure-Requests: 1'
Given that this is the 1st url of the site, I would expect to get the
exact same request cookies.
So I'm trying to understand what's going on, and how I can generate
"both" cookies using the cmdline curl to have the same response
cookies as the browser.
My reason for trying to get the cookies in the external cookie file -
to be able to pass/use the cookies in subsequent "curl" cmds from the
cmdline.
thoughts/comments???
thanks!
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: