Skip to content

Commit

Permalink
PostFile also needs the Expect header to be removed.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkraljevic committed May 9, 2015
1 parent 85fa66b commit d758762
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/h2o-package/R/ParseImport.R
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ h2o.uploadFile <- function(object, path, key = "", parse = TRUE, header, header_
url = paste(url, "?key=", URLencode(path), sep="")
if(file.exists(h2o.getLogPath("Command"))) .h2o.__logIt(url, NULL, "Command")
if(silent)
temp = postForm(url, .params = list(fileData = fileUpload(normalizePath(path))), .opts = curlOptions(useragent=R.version.string))
temp = postForm(url, .params = list(fileData = fileUpload(normalizePath(path))), .opts = curlOptions(httpheader = c('Expect' = ''), useragent=R.version.string))
else
temp = postForm(url, .params = list(fileData = fileUpload(normalizePath(path))), .opts = curlOptions(verbose = TRUE, useragent=R.version.string))
temp = postForm(url, .params = list(fileData = fileUpload(normalizePath(path))), .opts = curlOptions(httpheader = c('Expect' = ''), verbose = TRUE, useragent=R.version.string))
rawData = new("H2ORawData", h2o=object, key=path)
if(parse) parsedData = h2o.parseRaw(data=rawData, key=key, header=header, header_with_hash=header_with_hash, sep=sep, col.names=col.names, parser_type = parser_type) else rawData
}
Expand Down Expand Up @@ -549,4 +549,4 @@ h2o.order <- function(data, cols, n = 5, decreasing = T) {
inds <- verified_cols$cols_ind - 1
res <- .h2o.__remoteSend(data@h2o,.h2o.__PAGE_Order, source=data@key, cols=inds, n = n, rev = rev)
h2o.getFrame(data@h2o, res$destination_key)
}
}

0 comments on commit d758762

Please sign in to comment.