cURL / Mailing Lists / curl-users / Single Mail

curl-users

Trailing slash in Curl

From: Evgeny <morozov.e.r_at_gmail.com>
Date: Tue, 30 Aug 2016 16:51:51 +0300

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
Received on 2016-08-30