-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
It's quite a common task to check whether a URI leads to a dead end or not. For a "simple" HEAD request, handling the many edge cases (SSL, proxy etc) with net/http is very cumbersome and this excellent gem implements already most of these, therefore ...
Would you consider adding HEAD requests to open-uri. Possible API:
URI.open?("http://www.ruby-lang.org/")The HTTP status of the HEAD request should be interpreted as follows:
- Any 5xx status raises an exception: Server error means it's impossible to tell whether the URI is okay.
- Any 4xx status returns false: The URI is not valid.
- Any other status returns true: The URI is valid.
Bismarck-GM, n-rodriguez and kenkantzer-truss
Metadata
Metadata
Assignees
Labels
No labels