ropensci/rnoaa — pull request #72 by edweber (2014-11-10 17:11:29+00:00)
Title: Edchange

Upon further review, my pull requests #68 and #70 were not so good. Setting blank.lines.skip=FALSE in pull #68 introduced a new bug. When results are saved to memory, the newline at the end of text parsed from a "response" object results in a record of NAs as the last row of the dataframe. Files are still saved correctly without the trailing newline by httrs:::GET, so the bug doesn't appear when files are saved to disk. Sorry, I didn't notice that earlier.

I was also thinking about Scott's comment that the httr package usually encodes URLs as needed, but was not parsing query arguments that are quoted. My pull request #70 solves the specific problem of spaces in query arguments but other characters that should be escaped would still cause the function to puke. The httr package calls RCurl::curlEscape to do the encoding, so I think calling curlEscape on the args before adding them to the url is a more correct and robust fix. This would mean making the dependency on RCurl explicit though.