Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3769523
D1.id1.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D1.id1.diff
View Options
Index: Core.tcl
===================================================================
--- Core.tcl
+++ Core.tcl
@@ -1,3 +1,12 @@
+#
+# HTTP support
+#
+
+package require http
+package require tls
+::tls::init -ssl2 false -ssl3 false -tls1 true
+::http::register https 443 ::tls::socket
+
#
# TCL helpers
#
@@ -280,12 +289,6 @@
#Reads specified URL and returns content
proc geturltext {url {trim 1}} {
- package require http
- if {[string range [string tolower $url] 0 5] == "https:"} {
- package require tls
- http::register https 443 tls::socket
- }
-
set fd [http::geturl $url]
set text [http::data $fd]
http::cleanup $fd
Index: Daeghrefn/Bugzilla.tcl
===================================================================
--- Daeghrefn/Bugzilla.tcl
+++ Daeghrefn/Bugzilla.tcl
@@ -3,9 +3,6 @@
package require XMLRPC
package require SOAP
package require rpcvar
-package require http
-package require tls
-http::register https 443 ::tls::socket
bind dcc - bug dcc:bug
Index: Daeghrefn/Communication.tcl
===================================================================
--- Daeghrefn/Communication.tcl
+++ Daeghrefn/Communication.tcl
@@ -1,5 +1,3 @@
-package require http
-
bind dcc - sms dcc:sms
bind dcc - mail dcc:mail
bind dcc - twitter dcc:twitter
@@ -34,7 +32,6 @@
}
#Posts form
- package require http
set query [::http::formatQuery m $from p $message v $pass envoi Envoyer]
if {$xtra != ""} {append query &$xtra}
set tok [::http::geturl $url -query $query]
@@ -139,8 +136,6 @@
#Posts $message on the identi.ca $account account
proc identicapost {account message} {
- package require http
- package require base64
set row [lindex [sql "SELECT account_username, account_password FROM identica_accounts WHERE account_code = '$account'"] 0]
set auth "Basic [base64::encode [join $row :]]"
set tok [::http::geturl http://identi.ca/api/statuses/update.xml -headers [list Authorization $auth] -query [::http::formatQuery status $message]]
Index: Daeghrefn/Last.fm.tcl
===================================================================
--- Daeghrefn/Last.fm.tcl
+++ Daeghrefn/Last.fm.tcl
@@ -1,6 +1,5 @@
# .tcl source scripts/Daeghrefn/Last.fm.tcl
-package require http
package require json
bind dcc - lastfm dcc:lastfm
Index: Daeghrefn/Wolfplex.tcl
===================================================================
--- Daeghrefn/Wolfplex.tcl
+++ Daeghrefn/Wolfplex.tcl
@@ -1,5 +1,3 @@
-package require http
-
bind pub - !open pub:open
bind pub - !ouvert pub:open
bind pub - !close pub:close
@@ -16,7 +14,6 @@
}
proc setisopen {status} {
- package require http
set query [::http::formatQuery oldid 0 wpTextbox1 $status wpSave Publier]
set url "http://www.wolfplex.org/w/index.php?title=Mod%C3%A8le:IsOpen/status&action=edit"
set tok [::http::geturl $url -query $query]
Index: Daeghrefn/oauth.tcl
===================================================================
--- Daeghrefn/oauth.tcl
+++ Daeghrefn/oauth.tcl
@@ -41,16 +41,12 @@
# - example call: puts [oauth::query_api http://api.twitter.com/1/statuses/update.json <key> <secret> POST $oauth_token_done $oauth_token_secret_done [list status "does it work"]]
#
-package require http
# tcllib packages
package require base64
package require sha1
-package require tls
package provide oauth 0.1
-http::register https 443 ::tls::socket
-
namespace eval oauth {
variable request_token_url https://api.twitter.com/oauth/request_token
variable authorize_url https://api.twitter.com/oauth/authorize
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 15:17 (2 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260452
Default Alt Text
D1.id1.diff (3 KB)
Attached To
Mode
D1: Centralizes https configuration and force TLS only
Attached
Detach File
Event Timeline
Log In to Comment