| Class Rice::URL |
|
A Rice::URL knows how to parse URL strings and how to fetch the contents of a URL (currently only via HTTP or FTP).
| Methods |
| Attributes |
| :args | [RW] | |
| :host | [RW] | |
| :password | [RW] | |
| :path | [RW] | |
| :port | [RW] | |
| :scheme | [RW] | |
| :username | [RW] |
| Public Class methods |
| parse(urlString) |
| new(scheme, host, port=nil, path=nil, args=nil, username=nil, password=nil) |
| Public Instance methods |
| fetch() |
Fetches the content of this URL based on its scheme (http, ftp, etc.) Only http and ftp are implemented.
| fetchHTTP() |
Fetch contents using HTTP.
| fetchFTP() |
Fetch contents using FTP.
| to_s() |
| untaint() |
Untaint self and a few instance variables. Necessary when fetching contents of URL from within a script running at a $SAFE level >= 1 (for example a Web servlet). This is because the new socket created by an HTTP connection uses our @host and @port values. If they are tainted, the socket creation fails.