srowen commented on a change in pull request #30337:
URL: https://github.com/apache/spark/pull/30337#discussion_r523771521
##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -743,7 +743,15 @@ private[spark] object Utils extends Logging {
val is = Channels.newInputStream(source)
downloadFile(url, is, targetFile, fileOverwrite)
case "http" | "https" | "ftp" =>
- val uc = new URL(url).openConnection()
+ val url_object = new URL(url)
+ val uc = url_object.openConnection().asInstanceOf[HttpURLConnection]
Review comment:
Will this work in the case of an FTP URI?
Maybe needs some pattern matching to only set this if this is an
HttpURLConnection and user info is not null.
##########
File path: core/src/main/scala/org/apache/spark/util/Utils.scala
##########
@@ -743,7 +743,15 @@ private[spark] object Utils extends Logging {
val is = Channels.newInputStream(source)
downloadFile(url, is, targetFile, fileOverwrite)
case "http" | "https" | "ftp" =>
- val uc = new URL(url).openConnection()
+ val url_object = new URL(url)
+ val uc = url_object.openConnection().asInstanceOf[HttpURLConnection]
+ uc.setDoInput(true)
Review comment:
Is this actually needed?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]