cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: weird issue.. simple get not running..

From: Ray Satiro via curl-users <curl-users_at_cool.haxx.se>
Date: Wed, 4 May 2016 14:28:00 -0400

On 5/4/2016 2:45 AM, bruce wrote:
> Hi
>
> Running curl/centos 6.5 doing a basic Curl/Get. The prob I'm having,
> the following curl command seems to split on the '&' as opposed to the
> url running as a single/long url.
>
>
> curl -vvv -k -A "Mozilla/5.0 (Windows; U; Windows NT 6.1; ja-JP)
> AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3
> Safari/533.19.4" --cookie-jar aa.lwp --cookie aa.lwp -L
> "http://www.bkstr.com/webapp/wcs/stores/servlet/CourseMaterialsResultsView?catalogId=10001&categoryId=9604&storeId=10715&langId=-1&programId=249&termId=100040157&divisionDisplayName=%20&departmentDisplayName=ACCT&courseDisplayName=200&sectionDisplayName=01&demoKey=d&purpose=browse"
>
> I've tried single/double quotes around the url with no effect.. I've
> tried using & as well as &amp;
>
> The exact same URL works from the browser..

Can you show us the verbose output? Are you sure the problem is shell
characters? I tried that command in CentOS 7 and the server seems to be
very sensitive to which user agent is used. I don't see any splitting.

[liveuser_at_localhost ~]$ ps -p $$
    PID TTY TIME CMD
  13585 pts/1 00:00:00 bash
[liveuser_at_localhost ~]$ bash --version
GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[liveuser_at_localhost ~]$ curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.15.4
zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz
[liveuser_at_localhost ~]$ curl -vvv -k -A "Mozilla/5.0 (Windows; U;
Windows NT 6.1; ja-JP) AppleWebKit/533.20.25 (KHTML, like Gecko)
Version/5.0.3 Safari/533.19.4" --cookie-jar aa.lwp --cookie aa.lwp
-L
"http://www.bkstr.com/webapp/wcs/stores/servlet/CourseMaterialsResultsView?catalogId=10001&categoryId=9604&storeId=10715&langId=-1&programId=249&termId=100040157&divisionDisplayName=%20&departmentDisplayName=ACCT&courseDisplayName=200&sectionDisplayName=01&demoKey=d&purpose=browse"
* About to connect() to www.bkstr.com port 80 (#0)
* Trying 23.192.24.204...
* Connected to www.bkstr.com (23.192.24.204) port 80 (#0)
> GET
/webapp/wcs/stores/servlet/CourseMaterialsResultsView?catalogId=10001&categoryId=9604&storeId=10715&langId=-1&programId=249&termId=100040157&divisionDisplayName=%20&departmentDisplayName=ACCT&courseDisplayName=200&sectionDisplayName=01&demoKey=d&purpose=browse
HTTP/1.1
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ja-JP)
AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
> Host: www.bkstr.com
> Accept: */*
>

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-users
FAQ: https://curl.haxx.se/docs/faq.html
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-05-04