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

parse_url error on local file URI #309

Closed
daroczig opened this Issue Dec 31, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@daroczig

daroczig commented Dec 31, 2015

As far as I know, the URI schema for files is file://host/path, which becomes file:///path on localhost, so eg file:///tmp/foobar is valid, but parse_url fails on it:

> parse_url("file:///tmp/foobar")
Error in pieces[[1]] : subscript out of bounds

Session info:

> library(httr)
> devtools::session_info()
Session info -------------------------------------------------------------------
 setting  value                       
 version  R version 3.2.2 (2015-08-14)
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       <NA>                        

Packages -----------------------------------------------------------------------
 package   * version date       source        
 curl        0.9.3   2015-08-25 CRAN (R 3.1.2)
 devtools    1.8.0   2015-05-09 CRAN (R 3.1.2)
 digest      0.6.8   2014-12-31 CRAN (R 3.1.1)
 git2r       0.10.1  2015-05-07 CRAN (R 3.1.2)
 httr      * 1.0.0   2015-06-25 CRAN (R 3.1.2)
 magrittr    1.5     2014-11-22 CRAN (R 3.1.1)
 memoise     0.2.1   2014-04-22 CRAN (R 3.1.1)
 R6          2.1.1   2015-08-19 CRAN (R 3.1.2)
 Rcpp        0.12.2  2015-11-15 CRAN (R 3.2.2)
 rversions   1.0.1   2015-06-06 CRAN (R 3.1.2)
 stringi     0.5-5   2015-06-29 url (/@)      
 stringr     1.0.0   2015-04-30 CRAN (R 3.1.2)
 xml2        0.1.1   2015-06-02 CRAN (R 3.1.2)

I verified that the same error happens with the current dev version of httr as well.

@hadley hadley closed this in 1470f65 Jan 7, 2016

@daroczig

This comment has been minimized.

daroczig commented Jan 8, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment