Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Unified Diff: sdk/lib/io/http_impl.dart

Issue 11361090: Changed DARTSESSID's httpOnly property to true by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/standalone/io/http_session_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 740dc36d9aca19d335109cae0d3a01c2e46e49d6..cb2c2e0a8c714948cc91a268ae6bbfca75fbeaf4 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1144,12 +1144,13 @@ class _HttpResponse extends _HttpRequestResponseBase implements HttpResponse {
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].name.toUpperCase() == _DART_SESSION_ID) {
cookies[i].value = session.id;
+ cookies[i].httpOnly = true;
found = true;
break;
}
}
if (!found) {
- cookies.add(new Cookie(_DART_SESSION_ID, session.id));
+ cookies.add(new Cookie(_DART_SESSION_ID, session.id)..httpOnly = true);
}
}
// Add all the cookies set to the headers.
« no previous file with comments | « no previous file | tests/standalone/io/http_session_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698