cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Trailing slash in Curl

From: Bill Mercer <bmercer_at_nccer.org>
Date: Tue, 30 Aug 2016 21:07:18 +0000

A small way to show your support is to buy one of these nifty t-shirts.
https://teespring.com/shop/curl-logo?aid=marketplace&tsmac=marketplace&tsmic=search#pid=369&cid=6512&sid=front


From: curl-users [mailto:curl-users-bounces_at_cool.haxx.se] On Behalf Of bruce
Sent: Tuesday, August 30, 2016 10:32 AM
To: the curl tool
Subject: Re: Trailing slash in Curl

hey...
not to hijack the thread..
but as the OP stated.. we all who use curl.. owe the contributors a great deal of thanks for the app!!!
peace!

On Tue, Aug 30, 2016 at 9:51 AM, Evgeny <morozov.e.r_at_gmail.com<mailto:morozov.e.r_at_gmail.com>> wrote:
Hello, Daniel!
Thanks a lot for your great tool Curl!
It saves hundreds hours for me while I work on my site.

But I little bit confused about one point.

I tune url redirects for my site using htacess file.
When I perform
curl -Ls -o /dev/null -w %{url_effective} morozov.one/(something_else)
and final redirect is bare domain name
Curl outputs:
http://morozov.one/
Notice leading slash at the end of domain.

Even I send morozov.one without anything else curl outputs domain with leading slash.

This inflexible behaviour of curl doesn't allow me to see is where redirect from slash ended domain to without-slash domain or vise versa.

Can I switch off adding this slash in Curl?

Thanks again for your useful tool!

--
Evgeny

-------------------------------------------------------------------
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

-------------------------------------------------------------------
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-08-30