-
Notifications
You must be signed in to change notification settings - Fork 358
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
Document Dart HTTP response header handling #1062
base: master
Are you sure you want to change the base?
Document Dart HTTP response header handling #1062
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
pkgs/http/README.md
Outdated
|
||
## Response Headers | ||
|
||
The Dart HTTP client by default allows only the CORS-safelisted response headers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for BrowserClient-only, right? I'm not sure that this is the best place to add this documentation.
The documentation would logically belong to BrowserClient but people are unlikely to look there.
Maybe add a note in the headers
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
G'day @brianquinlan
Thanks for the reply.
I moved the comments into https://pub.dev/documentation/http/latest/http/BaseResponse/headers.html, as you suggested.
How does the PR look now? I have no idea what is gong on with the changelog. I just checked the Master branch I clone, and it has "-" chars.
Thanks,
Dave
@@ -1,234 +1,238 @@ | |||
## 1.1.3 | |||
|
|||
- Document HTTP client response header handling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you replaced "" with "-" - it is "" at HEAD: https://github.com/dart-lang/http/blob/master/pkgs/http/CHANGELOG.md?plain=1
Could you change the version to:
1.1.3-wip
And make the same change in pubspec.yaml
@@ -46,6 +46,19 @@ abstract class BaseResponse { | |||
/// If a header value contains whitespace then that whitespace may be replaced | |||
/// by a single space. Leading and trailing whitespace in header values are | |||
/// always removed. | |||
/// | |||
/// Please keep in mind that the Dart HTTP client is likely to be running side |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this might be too verbose. How about:
Some headers may be excluded by the client for security or privacy reasons. For example, browser-cased clients can only return headers in the CORS safelist or specifically allowed by the server.
Thanks Brian.
How about this: #1083
…On Mon, Dec 11, 2023 at 4:23 PM Brian Quinlan ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pkgs/http/CHANGELOG.md
<#1062 (comment)>:
> @@ -1,234 +1,238 @@
+## 1.1.3
+
+- Document HTTP client response header handling
It looks like you replaced "*" with "-" - it is "*" at HEAD:
https://github.com/dart-lang/http/blob/master/pkgs/http/CHANGELOG.md?plain=1
Could you change the version to:
1.1.3-wip
And make the same change in pubspec.yaml
------------------------------
In pkgs/http/lib/src/base_response.dart
<#1062 (comment)>:
> @@ -46,6 +46,19 @@ abstract class BaseResponse {
/// If a header value contains whitespace then that whitespace may be replaced
/// by a single space. Leading and trailing whitespace in header values are
/// always removed.
+ ///
+ /// Please keep in mind that the Dart HTTP client is likely to be running side
I think that this might be too verbose. How about:
Some headers may be excluded by the client for security or privacy
reasons. For example, browser-cased clients can only return headers in the
CORS safelist or specifically allowed by the server.
—
Reply to this email directly, view it on GitHub
<#1062 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMCHTXH5VSURHESGAXQB33YI6PXJAVCNFSM6AAAAABABUCSK2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONZWGM4DMMRVGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Regards,
Dave Seddon
+1 415 857 5102
|
Document the dart client HTTP response header handling, to help with issue: #726
Contribution guidelines:
dart format
.Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.