cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl: failed download due to missing encoding of spaces

From: Manfred Schwarb <manfred99_at_gmx.ch>
Date: Mon, 21 May 2012 10:48:10 +0200

Hi,

I tried to download some page which fails with curl (7.24.0), but is no
problem with wget or with some random web browser:

curl --trace-ascii trace.txt -o test.html "http://www.hkh-friend.net.np/rhdc/DataDisp11.asp?dom=d&tablewidth=650&graph=yes&allfields=true&GHeader=Monthly Total&sort=StCountry&kisim=all&table=rainfall&unit=mm&total=ok&Fyear=1971&Lyear=1994&FRec=1/1/1971&LRec=12/31/1971&SID=&StID=1020&StName=Paletwa&StCountry=Myanmar&StLon=92:31:00&StLat=21:11:00&StElev=55&DispType=Rainfall"

It turns out it is because curl sends the above URL as-is to the
server, whereas wget and web browsers encode the embedded space:

"GHeader=Monthly Total" vs. "GHeader=Monthly%20Total"

Shouldn't curl encode these spaces, or is the web server (Microsoft-IIS/5.0)
simply broken?

Thanks,
Manfred
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-05-21