[Zarutian] 29. desember 2006 (UTC): I am not quite understanding the spec http://openid.net/specs/openid-authentication-1_1.html
[Zarutian] 00:00 29. desember 2006 (UTC): Starting of an OpenID consumer package
[Zarutian] 22:49 30. desember 2006 (UTC): I cant figure out why the regexp's dont work propperly.
package require http
proc geturl {url} {
if {![regexp {^http://.*} $url]} { set url "http://[set url]" }
set token [http::geturl $url]
set ncode [http::ncode $token]
if {($ncode == "301") || ($ncode == "302")} {
# an redirect
upvar #0 $token state
if {![info exists state(meta)]} { error }
array set meta $state(meta)
if {![info exists meta(Location)]} { error }
return [geturl $meta(Location)]
}
set data [http::data $token]
http::cleanup $token
return $data
}
proc find_openid.server {input} {
#
if {[regexp {
if {[regexp {' in the input string, rather than just as far as the next one). To ask for the minimal match, use '.*?' instead, although I have found that doesn't always behave as I'd expect it to. In general, I'd say try to avoid the combination of '.*' if you can, and in this case it works if you match 'any number of non-quote characters'.
In summary, I think your patterns should be more like:
regexp {