Commit Graph

68 Commits

Author SHA1 Message Date
Aaron Seo 81f780a2e9
Rename web_dispatch config prefix to http_dispatch
(cherry picked from commit 8c09e6c7dd)
2025-03-06 22:07:45 -05:00
Aaron Seo 3908e5c42d
Add new configuration for rabbitmq_web_dispatch.auth_backends with a fallback to the core auth_backends
(cherry picked from commit b048ed55bb)
2025-03-06 22:07:34 -05:00
Michael Klishin 968eefa1bb
Bump (c) line year
There are no functional changes to this massive diff.
2025-01-01 17:54:10 -05:00
Michal Kuratczyk cfa3de4b2b
Remove unused imports (thanks elp!) 2024-05-23 16:36:08 +02:00
Michael Klishin 01092ff31f
(c) year bumps 2024-01-01 22:02:20 -05:00
Michael Klishin 1b642353ca
Update (c) according to [1]
1. https://investors.broadcom.com/news-releases/news-release-details/broadcom-and-vmware-intend-close-transaction-november-22-2023
2023-11-21 23:18:22 -05:00
Michael Klishin ec4f1dba7d
(c) year bump: 2022 => 2023 2023-01-01 23:17:36 -05:00
Luke Bakken 7fe159edef
Yolo-replace format strings
Replaces `~s` and `~p` with their unicode-friendly counterparts.

```
git ls-files *.erl | xargs sed -i.ORIG -e s/~s>/~ts/g -e s/~p>/~tp/g
```
2022-10-10 10:32:03 +04:00
Michael Klishin c38a3d697d
Bump (c) year 2022-03-21 01:21:56 +04:00
Philip Kuryloski 8c0eece3cd Adjustments for the latest bazel-erlang 2021-11-02 16:24:26 +01:00
Michael Klishin 52479099ec
Bump (c) year 2021-01-22 09:00:14 +03:00
Michael Klishin 74dd5c448c Switch to MPL2 2020-07-15 02:56:57 +03:00
Jean-Sébastien Pédron b8e33f35e2 Update copyright (year 2020) 2020-03-10 17:01:03 +01:00
Michael Klishin e1f2b067b2 (c) bump 2019-12-29 05:50:37 +03:00
Michael Klishin 02f8071075 Use HTTP in this test, references bc77495844 2019-03-20 13:32:26 +03:00
Spring Operator bc77495844 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).
* http://~s:~w/rabbit_web_dispatch_test/index.html (UnknownHostException) with 1 occurrences migrated to:
  https://~s:~w/rabbit_web_dispatch_test/index.html ([https](https://~s:~w/rabbit_web_dispatch_test/index.html) result UnknownHostException).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.rabbitmq.com/management.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/management.html ([https](https://www.rabbitmq.com/management.html) result 200).
* http://www.rabbitmq.com/web-mqtt.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/web-mqtt.html ([https](https://www.rabbitmq.com/web-mqtt.html) result 200).
* http://www.rabbitmq.com/web-stomp.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/web-stomp.html ([https](https://www.rabbitmq.com/web-stomp.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.mozilla.org/MPL/ with 12 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).

# Ignored
These URLs were intentionally ignored.

* http://127.0.0.1 with 1 occurrences
* http://www.w3.org/1999/xhtml with 1 occurrences
2019-03-20 03:25:25 -05:00
Michael Klishin 5b0a75f5a0 Fix Cowboy 1.1 API references spotted by xref 2017-10-25 01:35:29 +03:00
Daniil Fedotov b8aa33f769 Support cowboy2.
Change the dispatch mechanism to cowboy2.
Replace hooks with a stream handler.
Update cowboy APIs.
2017-10-23 11:27:10 +01:00
Michael Klishin 789198c03a Merge branch 'stable' 2017-04-02 22:04:32 +03:00
Michael Klishin 9d3d536d25 (c) year 2017-04-02 21:49:57 +03:00
Michael Klishin 91a709538b Merge branch 'stable'
Conflicts:
	test/rabbit_web_dispatch_SUITE.erl
2017-02-07 13:24:26 +03:00
Loïc Hoguin da5f4ee0f0 Parse the ip option when provided as a string 2017-02-07 11:06:30 +01:00
Jean-Sébastien Pédron 72b4930a79 Merge branch 'stable' 2016-09-27 16:36:21 +02:00
Jean-Sébastien Pédron d67d90639f rabbit_web_dispatch_SUITE: Run teardown steps at the end of the suite
Also, send notification for testcase start/end.
2016-09-27 16:35:00 +02:00
Jean-Sébastien Pédron f8ace52fd5 rabbit_web_dispatch_SUITE: Start inets where we need it
Before this patch, inets was started during the suite setup on the
common_test control node, but we used it on the started broker. This
remained unnoticed while the plugin was based on webmachine and mochiweb
which started inets too.

After the move to Cowboy, inets is not started anymore on the broker so
we need to explicitely start it.
2016-09-27 16:21:51 +02:00
Michael Klishin 914487360a Merge branch 'stable' 2016-06-25 00:21:18 +03:00
kjnilsson dbdef107ba remove some unused code
add travis config
2016-06-22 16:40:38 +01:00
Michael Klishin 4980c63121 Switch test suite to Common Test 2016-06-21 22:46:46 +03:00
Joseph Yiasemides 10022118e3 Change path to the Web Dispatch log file for the test
Write log file for HTTP requests/responses to the canonical directory
(when testing). This is set when the test set is run.
2016-01-05 11:26:22 +01:00
Joseph Yiasemides 7b79712478 Test that a given status is logged 2016-01-05 11:16:37 +01:00
Joseph Yiasemides 4cd8d43376 Test that Web Dispatch logs source IP address and path
This is general enough to test Web Dispatch with every application
that does logging as it's done here. Indeed, the Management plugin
does log like this, so this closes #483.
2016-01-04 16:23:15 +01:00
Michael Klishin 5f0f018e3a Merge branch 'stable' 2016-01-01 13:23:41 +03:00
Michael Klishin ec684d2b8e Update (c) info 2016-01-01 12:59:19 +03:00
Loïc Hoguin cfc4631f64 Use Cowboy instead of Webmachine/Mochiweb for Web plugins
As part of a push to reduce the number of dependencies from the
RabbitMQ project, the management plugin needed to be converted
from Webmachine to Cowboy REST. This plugin provides a convenient
interface to listeners, which had to be converted from Mochiweb's
to Cowboy's also.

Because Cowboy does not have any logging built-in we keep
Webmachine's access logger for now. It has been adapted to use
data coming from Cowboy, as opposed to Mochiweb. The event handler
for logging has also been moved to web dispatch.

The main breaking change in the interface is that contexts do not
take a fun for the main loop anymore, but instead take a dispatch
list of the routes to be served by that context. Routes must be
compiled using cowboy_router:compile(Routes), and will be served
with the context prefix appended.

Some contexts do not require any code change, including the static
contexts and port redirect contexts.

To serve many applications, we use a Cowboy middleware specific
to RabbitMQ which, when receiving a request, checks in the registry
if there is a matching application, and use its dispatch list for
any subsequent operations.
2015-12-21 18:05:36 +01:00
Jean-Sébastien Pédron 15386fe5f0 rabbit_web_dispatch_test: Fix relative path to docroot 2015-10-23 20:38:22 +02:00
Simon MacMullen 65bd3dc241 Update copyright for 2014 2014-03-17 17:25:26 +00:00
Simon MacMullen d8ac6ae972 s/VMware/GoPivotal/g 2013-07-01 10:49:15 +01:00
Simon MacMullen 524ba93dea Add unrelativise/2 and clean up tests a bit. 2013-05-30 12:15:51 +01:00
Simon MacMullen 77430d339a Fix tests 2013-02-08 14:49:55 +00:00
Emile Joubert 459a6124fe Update copyright 2013 2013-01-23 11:56:10 +00:00
Simon MacMullen 78865b286b Simplify rabbitmq_mochiweb quite a bit. Remove the ability for users to configure contexts and listeners in rabbitmq-mochiweb, alter the APIs so that users of rabbitmq-mochiweb (e.g. mgmt) supply a listener, presumably from their own config. Also remove rabbit_mochiweb:register_authenticated_static_context/6 as nothing has used it for ages, remove some dubious error handling from the registry (let it crash!) and merge rabbit_mochiweb_sup and rabbit_mochiweb_web as they are so interlinked. 2012-10-30 14:37:02 +00:00
Emile Joubert 30e0f89e6a Update copyright 2012 2012-02-02 17:46:43 +00:00
Simon MacMullen 1f648b521b R15B fix 2011-12-14 13:52:41 +00:00
Michael Bridgen 45f8a156d3 Merge bug24240 2011-07-20 12:49:32 +01:00
Michael Bridgen 933145877f Pattern match implicitly 2011-07-20 12:46:56 +01:00
Simon MacMullen d860483da7 A test? What a novel idea. 2011-07-19 12:30:26 +01:00
Simon MacMullen 5676d32b84 This test is no longer needed. 2011-07-04 19:07:19 +01:00
Michael Bridgen 2f77befcec Add unit tests for {Context, {Listener, Path}} form in config 2011-06-06 12:13:02 +01:00
Michael Bridgen 570bf3c663 Check for no_default_listener too 2011-05-16 14:19:56 +01:00
Michael Bridgen 331b972b57 Fix tests up for different implementation of check_contexts 2011-05-16 14:17:06 +01:00