mirror of https://github.com/fafhrd91/actix-web
Compare commits
4 Commits
527533ceee
...
6bf46fddac
Author | SHA1 | Date |
---|---|---|
|
6bf46fddac | |
|
3f9d88f859 | |
|
2eb801cb59 | |
|
7da7390f3a |
|
@ -49,7 +49,7 @@ jobs:
|
||||||
toolchain: ${{ matrix.version.version }}
|
toolchain: ${{ matrix.version.version }}
|
||||||
|
|
||||||
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
|
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
|
||||||
uses: taiki-e/install-action@v2.54.0
|
uses: taiki-e/install-action@v2.54.3
|
||||||
with:
|
with:
|
||||||
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
|
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ jobs:
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@v1.13.0
|
uses: actions-rust-lang/setup-rust-toolchain@v1.13.0
|
||||||
|
|
||||||
- name: Install just, cargo-hack
|
- name: Install just, cargo-hack
|
||||||
uses: taiki-e/install-action@v2.54.0
|
uses: taiki-e/install-action@v2.54.3
|
||||||
with:
|
with:
|
||||||
tool: just,cargo-hack
|
tool: just,cargo-hack
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ jobs:
|
||||||
toolchain: ${{ matrix.version.version }}
|
toolchain: ${{ matrix.version.version }}
|
||||||
|
|
||||||
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
|
- name: Install just, cargo-hack, cargo-nextest, cargo-ci-cache-clean
|
||||||
uses: taiki-e/install-action@v2.54.0
|
uses: taiki-e/install-action@v2.54.3
|
||||||
with:
|
with:
|
||||||
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
|
tool: just,cargo-hack,cargo-nextest,cargo-ci-cache-clean
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ jobs:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
|
|
||||||
- name: Install just
|
- name: Install just
|
||||||
uses: taiki-e/install-action@v2.54.0
|
uses: taiki-e/install-action@v2.54.3
|
||||||
with:
|
with:
|
||||||
tool: just
|
tool: just
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ jobs:
|
||||||
components: llvm-tools
|
components: llvm-tools
|
||||||
|
|
||||||
- name: Install just, cargo-llvm-cov, cargo-nextest
|
- name: Install just, cargo-llvm-cov, cargo-nextest
|
||||||
uses: taiki-e/install-action@v2.54.0
|
uses: taiki-e/install-action@v2.54.3
|
||||||
with:
|
with:
|
||||||
tool: just,cargo-llvm-cov,cargo-nextest
|
tool: just,cargo-llvm-cov,cargo-nextest
|
||||||
|
|
||||||
|
|
|
@ -77,12 +77,12 @@ jobs:
|
||||||
toolchain: ${{ vars.RUST_VERSION_EXTERNAL_TYPES }}
|
toolchain: ${{ vars.RUST_VERSION_EXTERNAL_TYPES }}
|
||||||
|
|
||||||
- name: Install just
|
- name: Install just
|
||||||
uses: taiki-e/install-action@v2.54.0
|
uses: taiki-e/install-action@v2.54.3
|
||||||
with:
|
with:
|
||||||
tool: just
|
tool: just
|
||||||
|
|
||||||
- name: Install cargo-check-external-types
|
- name: Install cargo-check-external-types
|
||||||
uses: taiki-e/cache-cargo-install-action@v2.1.2
|
uses: taiki-e/cache-cargo-install-action@v2.2.0
|
||||||
with:
|
with:
|
||||||
tool: cargo-check-external-types
|
tool: cargo-check-external-types
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@
|
||||||
- Always remove port from return value of `ConnectionInfo::realip_remote_addr()` when handling IPv6 addresses. from the `Forwarded` header.
|
- Always remove port from return value of `ConnectionInfo::realip_remote_addr()` when handling IPv6 addresses. from the `Forwarded` header.
|
||||||
- The `UrlencodedError::ContentType` variant (relevant to the `Form` extractor) now uses the 415 (Media Type Unsupported) status code in it's `ResponseError` implementation.
|
- The `UrlencodedError::ContentType` variant (relevant to the `Form` extractor) now uses the 415 (Media Type Unsupported) status code in it's `ResponseError` implementation.
|
||||||
- Apply `HttpServer::max_connection_rate()` setting when using rustls v0.22 or v0.23.
|
- Apply `HttpServer::max_connection_rate()` setting when using rustls v0.22 or v0.23.
|
||||||
|
- Always consume complete HTTP message body, even on error
|
||||||
|
|
||||||
## 4.7.0
|
## 4.7.0
|
||||||
|
|
||||||
|
|
|
@ -417,24 +417,23 @@ impl Future for HttpMessageBody {
|
||||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||||
let this = self.get_mut();
|
let this = self.get_mut();
|
||||||
|
|
||||||
if let Some(err) = this.err.take() {
|
while let Some(chunk) = ready!(Pin::new(&mut this.stream).poll_next(cx)) {
|
||||||
return Poll::Ready(Err(err));
|
if this.err.is_some() {
|
||||||
}
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
loop {
|
let chunk = chunk?;
|
||||||
let res = ready!(Pin::new(&mut this.stream).poll_next(cx));
|
if this.buf.len() + chunk.len() > this.limit {
|
||||||
match res {
|
this.err = Some(PayloadError::Overflow);
|
||||||
Some(chunk) => {
|
} else {
|
||||||
let chunk = chunk?;
|
this.buf.extend_from_slice(&chunk);
|
||||||
if this.buf.len() + chunk.len() > this.limit {
|
|
||||||
return Poll::Ready(Err(PayloadError::Overflow));
|
|
||||||
} else {
|
|
||||||
this.buf.extend_from_slice(&chunk);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
None => return Poll::Ready(Ok(this.buf.split().freeze())),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Poll::Ready(match this.err.take() {
|
||||||
|
None => Ok(this.buf.split().freeze()),
|
||||||
|
Some(err) => Err(err),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue