History log of /haiku/src/bin/urlwrapper.cpp
Revision Date Author Comments
# 26131447 18-Oct-2020 Murai Takashi <tmurai01@gmail.com>

bin/urlwrapper: Fix -Wmisleading-indentation

Fix misleadingly indented printf() at line 142.

Change-Id: I498d171db6a09425901a13d52a8b2eca1413a068
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3342
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# f82b4294 05-Mar-2019 François Revol <revol@free.fr>

urlwrapper: add support for binary plist webloc files

Quite hardcoded but it works.

We only support URLs shorter than 256 bytes as it's the only samples I have.


# a5330a8e 02-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove private support kit BUrl

Use the public BUrl from the network kit instead.


# 1346bfbf 09-Nov-2012 François Revol <revol@free.fr>

urlwrapper: Handle the doi: URI scheme

The DOI (Digital Object Identifier) is a unique identifier
for (scientific and other...) publications.
While the doi: URI scheme was only a draft, it's not totally unlikely
that we ever hit such a URI, in this case we just redirect to the
official DOI website.
cf. http://tools.ietf.org/html/draft-paskin-doi-uri


# 8d9d5563 09-Aug-2012 François Revol <revol@free.fr>

urlwrapper: add support for nfs: URI scheme

Now that NFSv4 almost works, add support for handling nfs: urls to urlwrapper.
Should later be replaced by a better solution but it works for the time being.


# aed35104 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 9ea67ec0 02-Nov-2011 François Revol <revol@free.fr>

Update comment; SCM URI schemes are handled by checkitout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43105 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f9ce3679 02-Nov-2011 François Revol <revol@free.fr>

Add some URI schemes to the list of suggested new ones to support.
Added support for the useless about: URI scheme, which asks an app with the provided signature its about window, or launched AboutSystem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43103 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d66b59cd 25-Nov-2010 François Revol <revol@free.fr>

wget should handle https as well just file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39639 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 94ce0283 25-Nov-2010 François Revol <revol@free.fr>

BUrl::Full() actually doesn't contain the protocol part, add it back for ftp so it understands it's an url. Add it for wget as well, doesn't hurt.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39638 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 015cd734 08-May-2010 Stephan Aßmus <superstippi@gmx.de>

When checking the return code from BRoster::Launch(), always check for
B_ALREADY_RUNNING and don't treat it as error condition. See BeBook
documentation for more details. This bug resulted in urlwrapper opening a
Terminal and trying to use wget on Bookmark files that are supposed to open
in WebPositive (or any other browser), in the case that this browser was
already running.

Absolutely needs to go into alpha2. ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36757 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d7acf4ab 10-Apr-2010 François Revol <revol@free.fr>

More cleanup :D


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36126 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 20433d6e 10-Apr-2010 François Revol <revol@free.fr>

Cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36125 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78839568 10-Apr-2010 François Revol <revol@free.fr>

- try to handle .webloc internet shortcut files from OSX,
- build uri scheme mimetype from the actual protocol specifier in the url,
- fallback to calling ourselves if no prefered app is set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36124 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af0ba3c2 20-Aug-2009 François Revol <revol@free.fr>

Fix gcc4 picky warnings...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32549 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 03458c01 13-May-2009 Jonas Sundström <jonas@kirilla.com>

More style guide fixes. Removed a lot of preprocessing / conditional building, with intent to fix or remove. Moved urlwrapper class declaration to its header file. Renamed things for clarity. Removed 5 extra mimetypes for IE shortcuts. (We have one, with sniffing rule and extension.) Moved the UnurlString() back to urlwrapper.cpp and renamed it _DecodeUrlString(). Tweaked copyright clauses. A lot more needs fixing, esp. in urlwrapper but also in BUrl, and I intend to keep working on this until we're satisfied. Let me know of any remaining/added style violations! Feedback welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30757 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a2439167 12-May-2009 Jonas Sundström <jonas@kirilla.com>

Hopefully fixed indentation in BUrl header. Made data members in BUrl private. Added some class methods. Adapted urlwrapper to use the BUrl class. Removed a few obvious comments and some code that was defined away. Turned off debugging. Stripped App suffix from class name. No intentional changes to the core functionality of urlwrapper.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 28e8dc8e 10-May-2009 Jonas Sundström <jonas@kirilla.com>

Move Url class out of /bin/urlwrapper into BPrivate::Support. I plan to add a Launch()-method that will make it useful to /bin/open, AboutSystem, People and other applications.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30702 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5db3b6c9 02-May-2009 François Revol <revol@free.fr>

Actually no need to pass the NULL either...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30576 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f5d92c0 23-Apr-2009 François Revol <revol@free.fr>

Fix bad args for VLC.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30356 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8dd71c2b 04-Apr-2009 François Revol <revol@free.fr>

Implemented UnurlString() and used it. Now you can fully use query: as in
query://%28%28MAIL:to==%22%2ahaiku%2a%22%29%26%26%28BEOS:TYPE==%22text/x-email%22%29%29 :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29903 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 48bd26db 31-Mar-2009 François Revol <revol@free.fr>

The telnet command handles an alternative port just fine, so pass it if present.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae05e8e7 03-Feb-2009 François Revol <revol@free.fr>

Return native error codes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29133 a95241bf-73f2-0310-859d-f6bbb57e9c96


# baa1c046 16-Oct-2008 François Revol <revol@free.fr>

Add support for non-standard port on ssh and sftp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28173 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af73a9fb 03-Sep-2007 François Revol <revol@free.fr>

Add reading of .url files from win, redirects to default browser.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22162 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f29df20 25-Apr-2007 François Revol <revol@free.fr>

Fix app sig and put it at a single place.
Add support for NetPositive bookmarks, so one can for ex place a bookmark on the desktop with an http: dl link for moz with pref app set to urlwrapper. *hint* Korli :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1f76bb6 25-Apr-2007 François Revol <revol@free.fr>

Cleaned up protocol configuration. Put compile-time config in a header file, so the rdef doesn't include mimes for urls we won't support.
Added http: support with wget in a Terminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20829 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f18055d 12-Mar-2007 François Revol <revol@free.fr>

Support for a query:<forumla> url type :) (still needs unencoding of quotes)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20378 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0f302e4 22-Feb-2007 François Revol <revol@free.fr>

more comments & todos


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20202 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b5a3387b 20-Feb-2007 François Revol <revol@free.fr>

Some cleanups and fixes. Really use the Url class. Fix building under Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20181 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2a6bab3c 02-Feb-2007 François Revol <revol@free.fr>

Only launch a new instance of BeShare if it's not yet running or we specify a server in the url.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20051 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9045e361 02-Feb-2007 François Revol <revol@free.fr>

Remove some debug output. Implied localhost for finger: and implied current server for BeShare.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20050 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44c1a9db 02-Feb-2007 François Revol <revol@free.fr>

Cleanup rdef
Rewrote url parsing (unfinished)
Added several url types. Now it handles: ftp, sftp, telnet, ssh, finger, sh, file, beshare (to BeShare), mms, rtp, rtsp (to VLC). Some make probably more sense to add to the respective apps (BeShare, VLC...) but it's still handy for now.
Now please everyone go fix your apps to use generic url support instead of hardcoding http: :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20048 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc7ccd64 02-Feb-2007 François Revol <revol@free.fr>

Doesn't really deserve its own folder...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20039 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a5330a8e41fab3b82f43d3e0d454f7abfa7b9174 02-Jul-2014 Ingo Weinhold <ingo_weinhold@gmx.de>

Remove private support kit BUrl

Use the public BUrl from the network kit instead.


# 1346bfbf6957d938493ff3a0e6fb360b3aba6816 09-Nov-2012 François Revol <revol@free.fr>

urlwrapper: Handle the doi: URI scheme

The DOI (Digital Object Identifier) is a unique identifier
for (scientific and other...) publications.
While the doi: URI scheme was only a draft, it's not totally unlikely
that we ever hit such a URI, in this case we just redirect to the
official DOI website.
cf. http://tools.ietf.org/html/draft-paskin-doi-uri


# 8d9d55630a323b48d41e998913bbac3d40f66c45 09-Aug-2012 François Revol <revol@free.fr>

urlwrapper: add support for nfs: URI scheme

Now that NFSv4 almost works, add support for handling nfs: urls to urlwrapper.
Should later be replaced by a better solution but it works for the time being.


# aed35104852941f0f6f3d1dcc5338b5f337d0a3c 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 9ea67ec09d9e3c2e465722c5a448527b29aa448c 02-Nov-2011 François Revol <revol@free.fr>

Update comment; SCM URI schemes are handled by checkitout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43105 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f9ce367963a33f0182eff64c59e1e5184899f75d 02-Nov-2011 François Revol <revol@free.fr>

Add some URI schemes to the list of suggested new ones to support.
Added support for the useless about: URI scheme, which asks an app with the provided signature its about window, or launched AboutSystem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43103 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d66b59cdfc8cc0291d70de23ecebb56ee7b40c3f 25-Nov-2010 François Revol <revol@free.fr>

wget should handle https as well just file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39639 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 94ce0283808df498a25dc88bc480b3bf3f33915e 25-Nov-2010 François Revol <revol@free.fr>

BUrl::Full() actually doesn't contain the protocol part, add it back for ftp so it understands it's an url. Add it for wget as well, doesn't hurt.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39638 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 015cd734f0ca2b744789460cf5d46e1abdca27a3 08-May-2010 Stephan Aßmus <superstippi@gmx.de>

When checking the return code from BRoster::Launch(), always check for
B_ALREADY_RUNNING and don't treat it as error condition. See BeBook
documentation for more details. This bug resulted in urlwrapper opening a
Terminal and trying to use wget on Bookmark files that are supposed to open
in WebPositive (or any other browser), in the case that this browser was
already running.

Absolutely needs to go into alpha2. ;-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36757 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d7acf4abc4c5ec580556622da428a51f92be5bb3 10-Apr-2010 François Revol <revol@free.fr>

More cleanup :D


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36126 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 20433d6ee291d6debca25692ecb46a943b27bf9b 10-Apr-2010 François Revol <revol@free.fr>

Cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36125 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78839568813e768d3a92f4f9ee950b1b5343f5f4 10-Apr-2010 François Revol <revol@free.fr>

- try to handle .webloc internet shortcut files from OSX,
- build uri scheme mimetype from the actual protocol specifier in the url,
- fallback to calling ourselves if no prefered app is set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36124 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af0ba3c2c805a306fc56a8d84ac09efb98c2af92 20-Aug-2009 François Revol <revol@free.fr>

Fix gcc4 picky warnings...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32549 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 03458c01a21e56eab3409700fdad253c3d15c121 13-May-2009 Jonas Sundström <jonas@kirilla.com>

More style guide fixes. Removed a lot of preprocessing / conditional building, with intent to fix or remove. Moved urlwrapper class declaration to its header file. Renamed things for clarity. Removed 5 extra mimetypes for IE shortcuts. (We have one, with sniffing rule and extension.) Moved the UnurlString() back to urlwrapper.cpp and renamed it _DecodeUrlString(). Tweaked copyright clauses. A lot more needs fixing, esp. in urlwrapper but also in BUrl, and I intend to keep working on this until we're satisfied. Let me know of any remaining/added style violations! Feedback welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30757 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a243916712ac89efc2142dd2060727e4588027ce 12-May-2009 Jonas Sundström <jonas@kirilla.com>

Hopefully fixed indentation in BUrl header. Made data members in BUrl private. Added some class methods. Adapted urlwrapper to use the BUrl class. Removed a few obvious comments and some code that was defined away. Turned off debugging. Stripped App suffix from class name. No intentional changes to the core functionality of urlwrapper.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30739 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 28e8dc8e80995d4a3cb2048ee5775c553fcd4118 10-May-2009 Jonas Sundström <jonas@kirilla.com>

Move Url class out of /bin/urlwrapper into BPrivate::Support. I plan to add a Launch()-method that will make it useful to /bin/open, AboutSystem, People and other applications.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30702 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5db3b6c9b356762155a9b049a618bcf103b68139 02-May-2009 François Revol <revol@free.fr>

Actually no need to pass the NULL either...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30576 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f5d92c0d56c6b204956eaa56b27fee0194acba1 23-Apr-2009 François Revol <revol@free.fr>

Fix bad args for VLC.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30356 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8dd71c2b234ae80d37330c7721062a667816c3e8 04-Apr-2009 François Revol <revol@free.fr>

Implemented UnurlString() and used it. Now you can fully use query: as in
query://%28%28MAIL:to==%22%2ahaiku%2a%22%29%26%26%28BEOS:TYPE==%22text/x-email%22%29%29 :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29903 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 48bd26db935155802276241ca2053d8af53a4623 31-Mar-2009 François Revol <revol@free.fr>

The telnet command handles an alternative port just fine, so pass it if present.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae05e8e72073709affc8c1330f14b8a0638ad29d 03-Feb-2009 François Revol <revol@free.fr>

Return native error codes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29133 a95241bf-73f2-0310-859d-f6bbb57e9c96


# baa1c046113e4b9fc6d05a2a9cdbafc24327d4e7 16-Oct-2008 François Revol <revol@free.fr>

Add support for non-standard port on ssh and sftp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28173 a95241bf-73f2-0310-859d-f6bbb57e9c96


# af73a9fb932cec96d114f57666b6b4659abed2a5 03-Sep-2007 François Revol <revol@free.fr>

Add reading of .url files from win, redirects to default browser.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22162 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f29df20b2dcda8f737c1456eac8aa47922131b8 25-Apr-2007 François Revol <revol@free.fr>

Fix app sig and put it at a single place.
Add support for NetPositive bookmarks, so one can for ex place a bookmark on the desktop with an http: dl link for moz with pref app set to urlwrapper. *hint* Korli :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f1f76bb6241394faf837fb5676201c3b85b56f9f 25-Apr-2007 François Revol <revol@free.fr>

Cleaned up protocol configuration. Put compile-time config in a header file, so the rdef doesn't include mimes for urls we won't support.
Added http: support with wget in a Terminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20829 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4f18055dfa58381d069ce47a0aecd297d30d32fc 12-Mar-2007 François Revol <revol@free.fr>

Support for a query:<forumla> url type :) (still needs unencoding of quotes)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20378 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0f302e45bca744fbc7590bdd8cec1a7ecd6099f 22-Feb-2007 François Revol <revol@free.fr>

more comments & todos


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20202 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b5a3387b08e8cb3dd9588dd6fdfd42730895cd32 20-Feb-2007 François Revol <revol@free.fr>

Some cleanups and fixes. Really use the Url class. Fix building under Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20181 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2a6bab3cb7591bc0c7c3a39f399298d98436e23c 02-Feb-2007 François Revol <revol@free.fr>

Only launch a new instance of BeShare if it's not yet running or we specify a server in the url.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20051 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9045e361819563d2641b299bed1d793e840177fb 02-Feb-2007 François Revol <revol@free.fr>

Remove some debug output. Implied localhost for finger: and implied current server for BeShare.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20050 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 44c1a9db62546845ca4068be4756ec4697bc84ff 02-Feb-2007 François Revol <revol@free.fr>

Cleanup rdef
Rewrote url parsing (unfinished)
Added several url types. Now it handles: ftp, sftp, telnet, ssh, finger, sh, file, beshare (to BeShare), mms, rtp, rtsp (to VLC). Some make probably more sense to add to the respective apps (BeShare, VLC...) but it's still handy for now.
Now please everyone go fix your apps to use generic url support instead of hardcoding http: :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20048 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc7ccd64a794e48a93f0ca5ae8dc8ee4b617317e 02-Feb-2007 François Revol <revol@free.fr>

Doesn't really deserve its own folder...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20039 a95241bf-73f2-0310-859d-f6bbb57e9c96