mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: support for underscores in URLs (when using S3 storage)
This commit is contained in:
@ -1,4 +1,15 @@
|
||||
require "open-uri"
|
||||
require "addressable/uri"
|
||||
|
||||
class URI::Parser
|
||||
|
||||
# HACK to support underscores in URLs
|
||||
def split(url)
|
||||
a = Addressable::URI::parse(url)
|
||||
[a.scheme, a.userinfo, a.host, a.port, nil, a.path, nil, a.query, a.fragment]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class FileHelper
|
||||
|
||||
|
Reference in New Issue
Block a user