{"action":"closed","issue":{"url":"https://api.github.com/repos/hadley/httr/issues/309","labels_url":"https://api.github.com/repos/hadley/httr/issues/309/labels{/name}","comments_url":"https://api.github.com/repos/hadley/httr/issues/309/comments","events_url":"https://api.github.com/repos/hadley/httr/issues/309/events","html_url":"https://github.com/hadley/httr/issues/309","id":124498311,"number":309,"title":"parse_url error on local file URI","user":{"login":"daroczig","id":495736,"avatar_url":"https://avatars.githubusercontent.com/u/495736?v=3","gravatar_id":"","url":"https://api.github.com/users/daroczig","html_url":"https://github.com/daroczig","followers_url":"https://api.github.com/users/daroczig/followers","following_url":"https://api.github.com/users/daroczig/following{/other_user}","gists_url":"https://api.github.com/users/daroczig/gists{/gist_id}","starred_url":"https://api.github.com/users/daroczig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daroczig/subscriptions","organizations_url":"https://api.github.com/users/daroczig/orgs","repos_url":"https://api.github.com/users/daroczig/repos","events_url":"https://api.github.com/users/daroczig/events{/privacy}","received_events_url":"https://api.github.com/users/daroczig/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-31T19:43:17Z","updated_at":"2016-01-07T23:53:30Z","closed_at":"2016-01-07T23:53:30Z","body":"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:\r\n\r\n```r\r\n> parse_url(\"file:///tmp/foobar\")\r\nError in pieces[[1]] : subscript out of bounds\r\n```\r\n\r\nSession info:\r\n\r\n```r\r\n> library(httr)\r\n> devtools::session_info()\r\nSession info -------------------------------------------------------------------\r\n setting  value                       \r\n version  R version 3.2.2 (2015-08-14)\r\n system   x86_64, linux-gnu           \r\n ui       X11                         \r\n language (EN)                        \r\n collate  en_US.UTF-8                 \r\n tz       <NA>                        \r\n\r\nPackages -----------------------------------------------------------------------\r\n package   * version date       source        \r\n curl        0.9.3   2015-08-25 CRAN (R 3.1.2)\r\n devtools    1.8.0   2015-05-09 CRAN (R 3.1.2)\r\n digest      0.6.8   2014-12-31 CRAN (R 3.1.1)\r\n git2r       0.10.1  2015-05-07 CRAN (R 3.1.2)\r\n httr      * 1.0.0   2015-06-25 CRAN (R 3.1.2)\r\n magrittr    1.5     2014-11-22 CRAN (R 3.1.1)\r\n memoise     0.2.1   2014-04-22 CRAN (R 3.1.1)\r\n R6          2.1.1   2015-08-19 CRAN (R 3.1.2)\r\n Rcpp        0.12.2  2015-11-15 CRAN (R 3.2.2)\r\n rversions   1.0.1   2015-06-06 CRAN (R 3.1.2)\r\n stringi     0.5-5   2015-06-29 url (/@)      \r\n stringr     1.0.0   2015-04-30 CRAN (R 3.1.2)\r\n xml2        0.1.1   2015-06-02 CRAN (R 3.1.2)\r\n```\r\n\r\nI verified that the same error happens with the current dev version of `httr` as well."}}