11 Commits
0.1.3 ... 0.1.4

Author SHA1 Message Date
7e6cfa7f8f fix blocking code in asynch 2023-10-04 18:21:18 +02:00
Hannes Kuchelmeister
bdf96b366a Merge pull request #11 from 13hannes11/dependabot/cargo/openssl-0.10.55
Bump openssl from 0.10.48 to 0.10.55
2023-06-22 10:40:49 +02:00
dependabot[bot]
569e7f71ef Bump openssl from 0.10.48 to 0.10.55
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.48 to 0.10.55.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.48...openssl-v0.10.55)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 22:54:44 +00:00
Hannes Kuchelmeister
41234a1fac Merge pull request #8 from 13hannes11/dependabot/cargo/h2-0.3.17
Bump h2 from 0.3.13 to 0.3.17
2023-06-13 13:45:38 +02:00
dependabot[bot]
0064698574 Bump h2 from 0.3.13 to 0.3.17
Bumps [h2](https://github.com/hyperium/h2) from 0.3.13 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.13...v0.3.17)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-13 16:56:16 +00:00
Hannes Kuchelmeister
271af82794 Merge pull request #7 from 13hannes11/dependabot/cargo/openssl-0.10.48
Bump openssl from 0.10.40 to 0.10.48
2023-03-25 20:50:08 +01:00
dependabot[bot]
776dccb15c Bump openssl from 0.10.40 to 0.10.48
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.40 to 0.10.48.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.40...openssl-v0.10.48)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-25 01:07:34 +00:00
Hannes Kuchelmeister
64b416e8b6 Merge pull request #5 from 13hannes11/dependabot/cargo/bumpalo-3.12.0
Bump bumpalo from 3.10.0 to 3.12.0
2023-02-09 09:22:50 +01:00
Hannes Kuchelmeister
977110fa99 Merge pull request #4 from 13hannes11/dependabot/cargo/tokio-1.25.0
Bump tokio from 1.19.2 to 1.25.0
2023-02-09 09:22:17 +01:00
dependabot[bot]
a701eb9a76 Bump bumpalo from 3.10.0 to 3.12.0
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.10.0 to 3.12.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.10.0...3.12.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 08:20:52 +00:00
dependabot[bot]
b3aeef646a Bump tokio from 1.19.2 to 1.25.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.19.2 to 1.25.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.19.2...tokio-1.25.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 08:20:36 +00:00
3 changed files with 697 additions and 544 deletions

1235
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
FROM rust:1.61 as builder FROM rust:1.72 as builder
RUN apt-get update && apt-get install -y sqlite3 && rm -rf /var/lib/apt/lists/* RUN apt-get update && apt-get install -y sqlite3 && rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/ics-proxy WORKDIR /usr/src/ics-proxy
COPY . . COPY . .

View File

@@ -26,8 +26,8 @@ async fn make_ics_request(req: HttpRequest, db_pool: web::Data<Pool<Sqlite>>) ->
match Uuid::parse_str(id) { match Uuid::parse_str(id) {
Ok(uuid) => match Link::find_by_uuid(uuid.to_string(), db_pool).await { Ok(uuid) => match Link::find_by_uuid(uuid.to_string(), db_pool).await {
Ok(link) => match reqwest::blocking::get(link.destination) { Ok(link) => match reqwest::get(link.destination).await {
Ok(r) => match r.text() { Ok(r) => match r.text().await {
Ok(res) => HttpResponse::Ok().content_type("text/calendar").body(res), Ok(res) => HttpResponse::Ok().content_type("text/calendar").body(res),
Err(err) => HttpResponse::Ok() Err(err) => HttpResponse::Ok()
.status(StatusCode::INTERNAL_SERVER_ERROR) .status(StatusCode::INTERNAL_SERVER_ERROR)