* docs: reword sentence
The sentence was a bit hard to follow. I think it seems more natural now.
* docs: fix whitespace
---------
Co-authored-by: Rob Ede <robjtede@icloud.com>
* fix: service macro comments #3472
* test: service macro comments #3472
* fix: add case for empty tuple seperately
* doc: add case for empty tuple seperately
* test: move test_services into lib
---------
Co-authored-by: Rob Ede <robjtede@icloud.com>
* Fix: Per discussion in #2958, set `SO_REUSEADDR` only non-Windows platforms.
Add: Tests confirming that only a single webserver instance may
bind to a given address.
* Clean: Lint.
* Clean: another guess at making the formatter happy.
* Clean: More cargo fmt fun. (Running cargo fmt locally doesn't help.)
---------
Co-authored-by: Bryan A. Jones <bjones1@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
* implemented function which returns full uir
* changes added into the changelog
* added test funtion for full_uri method
* refactor: rename to full_url
---------
Co-authored-by: Rob Ede <robjtede@icloud.com>
* Strip non-address characters from Forwarded for=
This is something of a followup to #2528, which asked for port information to not be included in when it was taken from the local socket.
The header's element may optionally contain port information (https://datatracker.ietf.org/doc/html/rfc7239#section-6).
However, as I understand it, is *supposed* to only contain an IP address, without port (per #2528).
This PR corrects that discrepancy, making it easier to parse the result of this method in application code.
There should not be any compatibility concerns, as anyone parsing the output of would already need to handle both port and portless cases anyway.
* Update CHANGES.md
---------
Co-authored-by: Rob Ede <robjtede@icloud.com>
* add scope proc macro
* Update scope macro code to work with current HttpServiceFactory
* started some test code
* add some unit tests
* code formatting cleanup
* add another test for combining and calling 2 scopes
* format code with formatter
* Update actix-web-codegen/src/lib.rs with comment documentation fix
Co-authored-by: oliver <151407407+kwfn@users.noreply.github.com>
* work in progress. revised procedural macro to change othe macro call
* add tests again. refactor nested code.
* clean up code. fix bugs with route and method attributes with parameters
* clean up for rust fmt
* clean up for rust fmt
* fix out of date comment for scope macro
* sync to master branch by adding test_wrap
* needed to format code
* test: split out scope tests
* test: add negative tests
* chore: move imports back inside (?)
* docs: tweak scope docs
* fix: prevent trailing slashes in scope prefixes
* chore: address clippy lints
---------
Co-authored-by: oliver <151407407+kwfn@users.noreply.github.com>
Co-authored-by: Rob Ede <robjtede@icloud.com>
* feat: add .customize().add_cookie()
* docs: added cookie hint
* fix: added unwrap to test of add_cookie()
* docs: added changelog entry for .customize().add_cookie()
* chore: make append_header infallible
* docs: update changelog
---------
Co-authored-by: Rob Ede <robjtede@icloud.com>