-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add session object to HTTP library #3258
Comments
I r7943 (http://code.google.com/p/dart/source/detail?r=7943) support for cookies where added to the HTTP server. The change provides a Cookie class for representing cookies in both server and client. It also includes support for non-folding of specific headers (default for Set-Cookie). |
This comment was originally written by TerryMit...@gmail.com I am happy to know that the item 1 is already in progress. |
Added this to the Later milestone. |
Changed the title to: "Add session object to HTTP library". |
This comment was originally written by TerryMitsuok...@gmail.com I deleted the Gist by mistake. New Gist (recent API changes incorporated) address is: https://gist.github.com/2941231 |
Support for sessions have now been added to the HTTP server. See http://api.dartlang.org/docs/bleeding_edge/dart_io/HttpRequest.html#session for more info. Removed this from the Later milestone. |
Removed Area-IO label. |
Revisions updated by `dart tools/rev_sdk_deps.dart`. dartdoc (https://github.com/dart-lang/dartdoc/compare/dc502d0..4d7dc93): 4d7dc93b 2022-12-05 dependabot[bot] Bump github/codeql-action from 2.1.31 to 2.1.35 (#3263) bcf8b6e8 2022-12-05 Parker Lougheed Weight enums the same as classes for searching (#3260) 7d95578b 2022-12-04 Parker Lougheed Update template descriptions (#3258) d558f043 2022-12-04 Parker Lougheed Fix error when using base element href (#3256) c3663762 2022-12-04 Parker Lougheed Add unnecessary override ignore to fix build (#3257) http (https://github.com/dart-lang/http/compare/976bd56..46a7708): 46a7708 2022-12-02 Brian Quinlan Remove binary artifact (#833) sync_http (https://github.com/dart-lang/sync_http/compare/f5c1f18..8622614): 8622614 2022-12-02 Kevin Moore blast_repo fixes (#32) test (https://github.com/dart-lang/test/compare/f3d80a6..4dceb87): 4dceb87c 2022-12-01 Nate Bosch Ignore some usage of dperecated errors (#1807) webdev (https://github.com/dart-lang/webdev/compare/91b8a19..e39506e): e39506e 2022-12-05 Anna Gringauze Pre-warm expression compiler to speed up Flutter Inspector page loading. (#1786) 9b19b3b 2022-12-02 Elliott Brooks (she/her) Can save storage objects in both `session` and `local` storage (#1807) e75c45e 2022-12-02 Elliott Brooks (she/her) Injected client adds `isFlutterApp` to global window object (#1806) ba5e3ec 2022-12-01 Elliott Brooks (she/her) `DebugSession` listens to events instead of just sending events (#1804) Change-Id: I881d02e966b763879df72b29653a9f241b71eb3d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273826 Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Nate Bosch <nbosch@google.com>
This is an accumulation of 12 commits to dartdoc, imported into dart-lang/sdk across 4 commits, noted below. I've also stripped out the changes made to any other repository in this DEPS file. Revisions updated by `dart tools/rev_sdk_deps.dart`. From cabf333: dartdoc (https://github.com/dart-lang/dartdoc/compare/eb90a44..1f42216): 1f422163 2022-12-13 Sam Rawlins Bump to 6.1.5 (#3274) From a3b7a76: eb90a44c 2022-12-12 Sam Rawlins Remove annotations from the features section of each element (#3268) 16126376 2022-12-12 Parker Lougheed Don't show null in search results when no description (#3273) 3ff7aa75 2022-12-12 Sam Rawlins Fix search arrows by using a flat list of suggestions (#3271) 90264fb4 2022-12-12 dependabot[bot] Bump github/codeql-action from 2.1.35 to 2.1.36 (#3270) bede500d 2022-12-12 Sam Rawlins Fix remote linking in 2.18 and 3.0.0 (#3267) From 0c14719: dartdoc (https://github.com/dart-lang/dartdoc/compare/4d7dc93..f2bb6e9): f2bb6e92 2022-12-07 Sam Rawlins Bump to 6.1.4 (#3266) From 3a1d7c7: dartdoc (https://github.com/dart-lang/dartdoc/compare/dc502d0..4d7dc93): 4d7dc93b 2022-12-05 dependabot[bot] Bump github/codeql-action from 2.1.31 to 2.1.35 (#3263) bcf8b6e8 2022-12-05 Parker Lougheed Weight enums the same as classes for searching (#3260) 7d95578b 2022-12-04 Parker Lougheed Update template descriptions (#3258) d558f043 2022-12-04 Parker Lougheed Fix error when using base element href (#3256) c3663762 2022-12-04 Parker Lougheed Add unnecessary override ignore to fix build (#3257) Change-Id: I21fc9ecd36db78b7ef420bd179af4907e667557d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279320 Reviewed-by: Kevin Moore <kevmoo@google.com> Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
This issue was originally filed by TerryMit...@gmail.com
1:
In the current HttpHeaders implementation,
response.headers.set("Set-Cookie", "text = HelloWorld");
response.headers.add("Set-Cookie", "text = AnotherHelloWorld");
or
response.headers.add("Set-Cookie", "text = HelloWorld");
response.headers.add("Set-Cookie", "text = AnotherHelloWorld");
creates a single set-cookie header consists of comma separated two cookies (Set-Cookie folded) such as:
set-cookie: text = HelloWorld, text = AnotherHelloWorld
The recent RFC 6265 Section 3 says:
Origin servers SHOULD NOT fold multiple Set-Cookie header fields into a single header field. The usual mechanism for folding HTTP headers fields (i.e., as defined in [RFC2616]) might change the semantics of the Set-Cookie header field because the %x2C (",") character is used by Set-Cookie in a way that conflicts with such folding.
For the view point of long term sustainability, it might be better to generate "Set-Cookie" headers one for each headers.set or headers.add call.
2:
I just completed a cookie based HttpSessionManager library which is almost equivalent to the HttpSession interface of Java Servlet. It works fine so far. It would be nice if dart:io had this kind of HttpSession interface (including URI rewrite based session also) and following methods were included in the HttpRequest interface:
getSession
getRequestedSessionId
isRequestedSessionIdValid
To try my cookie based HttpSessionManager library:
(1) From https://gist.github.com/2755552, download, decompress and rename the folder like HttpSessionLibrary.
(2) Open the folder from Dart Editor.
(3) Run HttpSessionTestServer.dart or SimpleShoppingCartServer.dart as a server.
(4) Access the server from your browser as http://localhost:8080/SessionTest or http://localhost:8080/GooSushi
The text was updated successfully, but these errors were encountered: