lib/async/http/endpoint.rb in async-http-0.45.1 vs lib/async/http/endpoint.rb in async-http-0.45.2
- old
+ new
@@ -111,11 +111,18 @@
else
"#{hostname}:#{port}"
end
end
+ # Return the path and query components of the given URL.
def path
- @url.request_uri
+ buffer = @url.path || "/"
+
+ if query = @url.query
+ buffer << "?#{query}"
+ end
+
+ return buffer
end
DEFAULT_ALPN_PROTOCOLS = ['h2', 'http/1.1'].freeze
def alpn_protocols
\ No newline at end of file