Skip to content

Commit

Permalink
add changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Mar 11, 2021
1 parent a93217c commit 9a8e8d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions actix-http/CHANGES.md
Expand Up @@ -4,7 +4,11 @@
### Chaged
* `client::Connector` type now only have one generic type for `actix_service::Service`. [#2063]

### Removed
* Cookie handling. `actix-web` and `awc` retain cookie support. [#2065]

[#2063]: https://github.com/actix/actix-web/pull/2063
[#2065]: https://github.com/actix/actix-web/pull/2065


## 3.0.0-beta.4 - 2021-03-08
Expand Down
2 changes: 0 additions & 2 deletions src/cookie_ext.rs
Expand Up @@ -9,7 +9,6 @@ struct Cookies(Vec<Cookie<'static>>);

pub trait RequestCookieExt: HttpMessage {
/// Load request cookies.
#[cfg(feature = "cookies")]
fn cookies(&self) -> Result<Ref<'_, Vec<Cookie<'static>>>, CookieParseError> {
if self.extensions().get::<Cookies>().is_none() {
let mut cookies = Vec::new();
Expand All @@ -30,7 +29,6 @@ pub trait RequestCookieExt: HttpMessage {
}

/// Return request cookie.
#[cfg(feature = "cookies")]
fn cookie(&self, name: &str) -> Option<Cookie<'static>> {
if let Ok(cookies) = self.cookies() {
for cookie in cookies.iter() {
Expand Down
11 changes: 8 additions & 3 deletions src/lib.rs
Expand Up @@ -79,7 +79,6 @@ extern crate tls_rustls as rustls;
mod app;
mod app_service;
mod config;
mod cookie_ext;
mod data;
pub mod error;
mod extract;
Expand All @@ -101,14 +100,14 @@ pub(crate) mod types;
pub mod web;

#[cfg(feature = "cookies")]
pub use ::cookie;
mod cookie_ext;

pub use actix_http::Response as HttpResponse;
pub use actix_http::{body, http, Error, HttpMessage, ResponseError, Result};
pub use actix_rt as rt;
pub use actix_web_codegen::*;

pub use crate::app::App;
pub use crate::cookie_ext::{RequestCookieExt, ResponseCookieExt};
pub use crate::extract::FromRequest;
pub use crate::request::HttpRequest;
pub use crate::resource::Resource;
Expand All @@ -119,6 +118,12 @@ pub use crate::server::HttpServer;
// TODO: is exposing the error directly really needed
pub use crate::types::{Either, EitherExtractError};

#[cfg(feature = "cookies")]
pub use {
crate::cookie_ext::{RequestCookieExt, ResponseCookieExt},
::cookie,
};

pub mod dev {
//! The `actix-web` prelude for library developers
//!
Expand Down

0 comments on commit 9a8e8d0

Please sign in to comment.