returns the parser to be used.
Unless a URI::Parser is defined, then DEFAULT_PARSER is used.
check the fragment v component against the URI::Parser Regexp for :FRAGMENT
vString
public setter for the fragment component v. (with validation)
require 'uri' uri = URI.parse("http://my.example.com/?id=25#time=1305212049") uri.fragment = "time=1305212086" # => "time=1305212086" uri #=> #<URI::HTTP:0x000000007a81f8 URL:http://my.example.com/?id=25#time=1305212086>
uriString
parses uri and constructs either matching URI scheme object (FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic
p = URI::Parser.new p.parse("ldap://ldap.example.com/dc=example?user=john") #=> #<URI::LDAP:0x00000000b9e7e8 URL:ldap://ldap.example.com/dc=example?user=john>
strString to search
schemesPatterns to apply to str
Attempts to parse and merge a set of URIs If no block given , then returns the result, else it calls block for each element in result.
see also URI::Parser.make_regexp
uriString
parses uri and constructs either matching URI scheme object (FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic
p = URI::Parser.new p.parse("ldap://ldap.example.com/dc=example?user=john") #=> #<URI::LDAP:0x00000000b9e7e8 URL:ldap://ldap.example.com/dc=example?user=john>
strString to search
schemesPatterns to apply to str
Attempts to parse and merge a set of URIs If no block given , then returns the result, else it calls block for each element in result.
see also URI::Parser.make_regexp
Starts the CGI process with the given environment env and standard input and output stdin and stdout.
Parses a Cookie field sent from the user-agent. Returns an array of cookies.
Parses a request from socket. This is called internally by WEBrick::HTTPServer.
Shortcut for logging an ERROR message
Shortcut for logging a WARN message
Will the logger output ERROR messages?
Will the logger output WARN messages?
A SimpleServer only yields when you start it
Performs the standard operations for daemonizing a process. Runs a block, if given.
Starts the server and runs the block for each connection. This method does not return until the server is stopped from a signal handler or another thread using stop or shutdown.
If the block raises a subclass of StandardError the exception is logged and ignored. If an IOError or Errno::EBADF exception is raised the exception is ignored. If an Exception subclass is raised the exception is logged and re-raised which stops the server.
To completely shut down a server call shutdown from ensure:
server = WEBrick::GenericServer.new # or WEBrick::HTTPServer.new begin server.start ensure server.shutdown end
Similar to read, but raises EOFError at end of string instead of returning nil, as well as IO#sysread does.
Reads at most maxlen bytes from the stream. If buf is provided it must reference a string which will receive the data.
See IO#readpartial for full details.
Reads a one-character string from the stream. Raises an EOFError at end of file.
If a block is given, it prints out each of the elements encountered. Block parameters are (in that order):
depth: The recursion depth, plus one with each constructed value being encountered (Integer)
offset: Current byte offset (Integer)
header length: Combined length in bytes of the Tag and Length headers. (Integer)
length: The overall remaining length of the entire data (Integer)
constructed: Whether this value is constructed or not (Boolean)
tag_class: Current tag class (Symbol)
tag: The current tag number (Integer)
der = File.binread('asn1data.der') OpenSSL::ASN1.traverse(der) do | depth, offset, header_len, length, constructed, tag_class, tag| puts "Depth: #{depth} Offset: #{offset} Length: #{length}" puts "Header length: #{header_len} Tag: #{tag} Tag class: #{tag_class} Constructed: #{constructed}" end
Start streaming using encoding
Clears the GC profiler data.
Returns whether the form contained multipart/form-data