diff options
| author | Benjamin Sanders <ben@Benjamins-MacBook-Pro.local> | 2025-10-11 10:34:24 -0400 |
|---|---|---|
| committer | Benjamin Sanders <ben@Benjamins-MacBook-Pro.local> | 2025-10-11 10:34:24 -0400 |
| commit | 5571dc766e2143e39762ff0b47c41d1c2e154f4c (patch) | |
| tree | f4f124d314a7e76c04484515aa0fd1f2e271a601 /vendor/bundle/ruby/3.4.0/gems/webrick-1.9.1/sig/httpservlet/filehandler.rbs | |
| parent | 359f3309c97fc894b63e0a295c76ab298504d635 (diff) | |
Vendor bundled gems for deployment
Diffstat (limited to 'vendor/bundle/ruby/3.4.0/gems/webrick-1.9.1/sig/httpservlet/filehandler.rbs')
| -rw-r--r-- | vendor/bundle/ruby/3.4.0/gems/webrick-1.9.1/sig/httpservlet/filehandler.rbs | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/vendor/bundle/ruby/3.4.0/gems/webrick-1.9.1/sig/httpservlet/filehandler.rbs b/vendor/bundle/ruby/3.4.0/gems/webrick-1.9.1/sig/httpservlet/filehandler.rbs new file mode 100644 index 0000000..792fd2a --- /dev/null +++ b/vendor/bundle/ruby/3.4.0/gems/webrick-1.9.1/sig/httpservlet/filehandler.rbs @@ -0,0 +1,76 @@ +module WEBrick + module HTTPServlet + class DefaultFileHandler < AbstractServlet + @local_path: String + + def initialize: (HTTPServer server, String local_path) -> void + + def do_GET: (HTTPRequest req, HTTPResponse res) -> void + + def not_modified?: (HTTPRequest req, HTTPResponse res, Time mtime, String etag) -> bool + + # returns a lambda for webrick/httpresponse.rb send_body_proc + def multipart_body: (File body, Array[[Numeric, Numeric]] parts, String boundary, String mtype, Integer filesize) -> HTTPResponse::_CallableBody + + def make_partial_content: (HTTPRequest req, HTTPResponse res, String filename, Integer filesize) -> void + + def prepare_range: (Range[Integer] range, Integer filesize) -> [Numeric, Numeric] + end + + class FileHandler < AbstractServlet + @config: AbstractServlet::_Config + + @logger: Log + + @root: String + + @options: Hash[Symbol, untyped] + + HandlerTable: Hash[String, singleton(AbstractServlet)] + + def self.add_handler: (String suffix, singleton(AbstractServlet) handler) -> singleton(AbstractServlet) + + def self.remove_handler: (String suffix) -> singleton(AbstractServlet) + + def initialize: (HTTPServer server, String root, ?Hash[Symbol, untyped] options, ?Hash[Symbol, untyped] default) -> void + + def set_filesystem_encoding: (String str) -> String + + def service: (HTTPRequest req, HTTPResponse res) -> void + + def do_GET: (HTTPRequest req, HTTPResponse res) -> void + + def do_POST: (HTTPRequest req, HTTPResponse res) -> void + + def do_OPTIONS: (HTTPRequest req, HTTPResponse res) -> void + + private + + def trailing_pathsep?: (String path) -> bool + + def prevent_directory_traversal: (HTTPRequest req, HTTPResponse res) -> void + + def exec_handler: (HTTPRequest req, HTTPResponse res) -> bool + + def get_handler: (HTTPRequest req, HTTPResponse res) -> singleton(AbstractServlet) + + def set_filename: (HTTPRequest req, HTTPResponse res) -> bool + + def check_filename: (HTTPRequest req, HTTPResponse res, String name) -> void + + def shift_path_info: (HTTPRequest req, HTTPResponse res, String path_info, ?String? base) -> void + + def search_index_file: (HTTPRequest req, HTTPResponse res) -> String? + + def search_file: (HTTPRequest req, HTTPResponse res, String basename) -> String? + + def call_callback: (Symbol callback_name, HTTPRequest req, HTTPResponse res) -> void + + def windows_ambiguous_name?: (String name) -> bool + + def nondisclosure_name?: (String name) -> bool + + def set_dir_list: (HTTPRequest req, HTTPResponse res) -> void + end + end +end |
