-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GET on FTP URL returns empty status_code() #190
Comments
I guess what you really want is the FTP return code? I'm not knowledgeable enough about how RCurl/Curl handles FTP to say how it might be retrieved, but some experimentation I did with the above code indicates that server-side errors are passed to RCurl, and result in a stop. So if we point to a file that doesn't exist:
So, you can at least see if it didn't work ;p. Not sure if this applies to all possible negative responses, however. |
I don't have any plans to support ftp in httr. |
Handle it if GET() returns an empty status code, which happens with FTP URLs (see r-lib/httr#190). Also handle it if the status code is 302, which just means there was a redirect. This still produces a lot of output from the FTP server. Also if Rsamtools is not installed, downloading a dbSNP VCF resource will cause an error, so some sort of dependency on Rsamtools needs to be declared. git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/AnnotationHub@98776 bc3139a8-67e5-0310-9ffc-ced21a209358
Even though it looks like the download completed fine and I can write it out:
Comparing the size and md5sum of the file downloaded here vs. the same file downloaded to a different directory using my web browser, indicates the two files have identical contents. So the download succeeded, but I don't really have any way of knowing that (do I?) because the status code of the response is empty. I understand that this is an FTP request, not an HTTP request, so maybe I should not expect an HTTP status code here, but I'm not sure how I can tell programmatically if the request was successful.
Thanks.
The text was updated successfully, but these errors were encountered: