Skip to content

Commit db54089

Browse files
authored
Merge pull request mochi#232 from mochi/v2.21.0
v2.21.0 and try github actions
2 parents 448984c + 3f4884c commit db54089

File tree

6 files changed

+59
-14
lines changed

6 files changed

+59
-14
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
jobs:
7+
test:
8+
name: test
9+
runs-on: ${{matrix.os}}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os:
14+
- ubuntu-latest
15+
otp:
16+
- "24.0.2"
17+
- "23.3.1"
18+
- "22.3.4.9"
19+
- "21.3.8.17"
20+
- "20.3.8.26"
21+
include:
22+
- os: ubuntu-18.04
23+
otp: "21.2.7"
24+
- os: ubuntu-18.04
25+
otp: "19.3.6.13"
26+
- os: ubuntu-18.04
27+
otp: "18.3.4.11"
28+
- os: ubuntu-18.04
29+
otp: "16.b.2.basho10"
30+
steps:
31+
- uses: actions/[email protected]
32+
- run: |
33+
VERSION=${{matrix.otp}}
34+
RELEASE=$(lsb_release -cs)
35+
DIR=$(mktemp -d)
36+
pushd $DIR
37+
FILE=esl-erlang_$VERSION-1~ubuntu~$RELEASE\_amd64.deb
38+
wget https://packages.erlang-solutions.com/erlang/debian/pool/$FILE
39+
sudo dpkg -i $FILE
40+
popd
41+
rm -r $DIR
42+
- run: make test

.travis.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,8 @@ sudo: false
22
language: erlang
33
notifications:
44
email: false
5-
otp_release:
6-
- 23.0
7-
- 22.0
8-
- 21.3
9-
- 21.2.3
10-
- 21.1
11-
- 21.0
12-
- 20.0
13-
- 19.0
145
matrix:
156
include:
16-
- otp_release: 18.3
17-
dist: trusty
187
- otp_release: 17.5
198
dist: trusty
209
- otp_release: R16B03-1

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Version 2.21.0 released 2021-06-06
2+
3+
* Upgrade crypto functions to support OTP 23
4+
https://github.com/mochi/mochiweb/pull/231
5+
* Switch from Travis to GitHub Actions for testing
6+
https://github.com/mochi/mochiweb/pull/232
7+
18
Version 2.20.1 released 2020-02-03
29

310
* Removed deprecated metadata from .app file

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ To create a new mochiweb using project in a specific directory:
1414

1515
Information about Rebar (Erlang build tool) is available at https://github.com/rebar/rebar
1616

17-
MochiWeb is currently tested with Erlang/OTP R15B03 through 22.0.
17+
MochiWeb is currently tested with Erlang/OTP 18.3 through 24.0,
18+
but may still be compatible back to R15B-03.
1819

1920
# OTP 21.2, 21.2.1, 21.2.2 warning
2021

src/mochiweb.app.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%% This is generated from src/mochiweb.app.src
22
{application, mochiweb,
33
[{description, "MochiMedia Web Server"},
4-
{vsn, "2.20.1"},
4+
{vsn, "2.21.0"},
55
{modules, []},
66
{registered, []},
77
{env, []},

src/mochiweb_util.erl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,14 +356,20 @@ urlsplit_query("#" ++ Rest, Acc) ->
356356
urlsplit_query([C | Rest], Acc) ->
357357
urlsplit_query(Rest, [C | Acc]).
358358

359+
extension(Name) ->
360+
case filename:extension(Name) of
361+
"" -> Name;
362+
Ext -> Ext
363+
end.
364+
359365
%% @spec guess_mime(string()) -> string()
360366
%% @doc Guess the mime type of a file by the extension of its filename.
361367
guess_mime(File) ->
362368
case filename:basename(File) of
363369
"crossdomain.xml" ->
364370
"text/x-cross-domain-policy";
365371
Name ->
366-
case mochiweb_mime:from_extension(filename:extension(Name)) of
372+
case mochiweb_mime:from_extension(extension(Name)) of
367373
undefined ->
368374
"text/plain";
369375
Mime ->

0 commit comments

Comments
 (0)