REBOL3 tracker
  0.9.12 beta
Ticket #0002207 User: anonymous

Project:

Previous Next
rss
TypeBug Statussubmitted Date23-Mar-2015 22:47
Versionr3 master CategoryParse Submitted byIngoHohmann
PlatformAll Severitymajor Prioritynormal

Summary It is impossible to read/write url! s with some special characters
Description URL!s with "#" "@" ":" can not be read, bacause they are not url-encoded / interpreted incorrectly.

Furthermore, when trying to url-encode it by hand, the "%" will be url-encoded again in the url, renedering it incorrect again.

Example code
URL-encoding:

    >> url: http://test/abc/#def/ghi
    == http://test/abc/#def/ghi

If I do it manually, the "%" gets encoded, though:

    >> replace url "#" "%23"
    == http://test/abc/%2523def/ghi

"@" and ":"

    >> read  http://localhost:8008/@xxx:localhost
    ** Access error: cannot connect: tcp://xxx:80 reason: 0
    ** Where: open open unless sync-op either read
    ** Near: open conn port

"#" as part of the url:

    >> write http://localhost:8008/_matrix/client/api/v1/join/#test2:localhost?access_token=shortened ""
    ** Access error: protocol error: "Server error: HTTP/1.0 403 Forbidden"

Testing the same using curl:

    $ curl -XPOST "http://localhost:8008/_matrix/client/api/v1/join/#test2:localhost?access_token=shortened" -d ""
    {"errcode":"M_FORBIDDEN","error":"Missing access token."}⏎           

My guess is that the url is cut at the "#", because of it special meaning in urls. So let's try to url-encode the "#":

    >> write http://localhost:8008/_matrix/client/api/v1/join/%23test2:localhost?access_token=shortened ""
    ** Access error: protocol error: "Server error: HTTP/1.0 403 Forbidden"

Testing again with curl:

    $ curl -XPOST "http://localhost:8008/_matrix/client/api/v1/join/%23test2:localhost?access_token=shortened" -d ""
    {"room_id":"!mLfKqJqpsJduuNgzDy:localhost"}⏎  

So the problem for Rebol seems to be that "#" is not url-encoded, but if I try to url-encode it, the "%" sign gets encoded, so the url is broken again. (As mentioned in the beginning).

Assigned ton/a Fixed in- Last Update24-Mar-2015 04:21


Comments

Date User Field Action Change
24-Mar-2015 04:21 abolka Description Modified -
24-Mar-2015 04:21 abolka Code Modified -
23-Mar-2015 22:47 IngoHohmann Ticket Added -