cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problems with document root when retrieving files

From: Randy Zauhar <artemisdiscovery_at_me.com>
Date: Mon, 19 Jul 2010 09:56:37 -0700 (PDT)

Hi All,  I looked in the archive but did not see reference to this specific problem. May simply reflect my ignorance of how URLs are interpreted.  Just to be concrete, my apache server is configured with document root /Library/WebServer/Documents/ArtemisDiscoveryWeb. If I use a browser, I can readily pull a file by simply entering the URL in the browser window: https://www.artemisdiscovery.com/foo.txt,where foo.txt is in my document root.  When using libcurl (I essentially copied from the 'getinmemory.c' example) I receive a 404 message (file not not found) and the path of the missing file is reported as /foo.txt  (why the leading / ?) I actually have a workaround - I wrote a simple PHP script that is invoked as https://www.artemisdiscovery.com/pumpFile.php?name=foo.txt and that seems to work great! But why am I having to take this route? Thanks in advance, Randy Randy J. Zauhar, PhD ArtemisDiscovery, LLC Independents Hall 20 N. 3rd Street, Unit 201 Philadelphia, PA 19106 267-303-4766 artemisdiscovery@me.com University address: Depts. of Chemistry & Biochemistry, Bioinformatics & Computer Science University of the Sciences in Philadelphia 600 S. 43rd Street Philadelphia, PA 19104 215-596-8691 r.zauhar@usp.edu

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-07-19