Artifacts Associated With Ticket 5f923c60b2
Ticket change [ff0c39d0d5] (rid 141874) by anonymous on 2015-05-19 15:33:06:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
::http::geturl doesn't accept this url: http://127.0.0.1:33543/hub/session/fedc2754-770e-4b3a-9c1e-2fb16d0e0eaf/element/{56dcfe8e-c512-4dbf-a37a-4dbfb6d14b98}/value I suppose the reason is these characters: "{", "}" I am developing a selenium library in TCL. And this kind of url's are common. Python automatically converts these illegal characters in path to hexadecimal. I think that ::http::geturl should also convert all illegal characters in the path. - foundin initialized to: "8.6"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "1c4b6cdb98c9dfc4d1e74018f3f4efa00ad217e2"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "29. http Package"
- title initialized to: "Bug in library http. Illegal characters in path"
- type initialized to: "Bug"
Ticket change [e96f15395f] (rid 162357) by kjnash on 2018-04-13 15:08:54:
- icomment:
There are corner cases that would make this conversion a little awkward - for example if a user has edited a URL in the address bar and added illegal characters, should the command conclude that the entire URL needs conversion and convert any existing "%" again? What if an existing "%" is not followed by a valid hexadecimal code? Should "+" be considered a valid conversion of the space character, or should it be converted to "%2B"? I wonder how the Python library resolves problems like this. The command http::geturl expects a valid URL. However, the http library could provide commands to encode a URL before passing it to http::geturl. In the meantime, if you know that the URL path needs encoding, the following code will do it: package require http package require uri proc urlEncodePath {url} { set splits [uri::split $url] set encPathList {} set path [dict get $splits path] set pathList [split $path /] foreach el $pathList { lappend encPathList [http::mapReply $el] } set path [join $encPathList /] dict set splits path $path uri::join {*}$splits } set url http://127.0.0.1:33543/hub/session/fedc2754-770e-4b3a-9c1e-2fb16d0e0eaf/element/{56dcfe8e-c512-4dbf-a37a-4dbfb6d14b98}/value urlEncodePath $url - returns - http://127.0.0.1:33543/hub/session/fedc2754-770e-4b3a-9c1e-2fb16d0e0eaf/element/%7B56dcfe8e-c512-4dbf-a37a-4dbfb6d14b98%7D/value - login: "kjnash"
- mimetype: "text/plain"
- icomment:
Ticket change [61b1fafbe0] (rid 190580) by kjnash on 2020-12-31 15:15:54:
- login: "kjnash"
- mimetype: "text/plain"
- title changed to: "URL-Encoding of invalid characters in URL"
- type changed to: "RFE"