-
Notifications
You must be signed in to change notification settings - Fork 58
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
proxy+auth: fix post request #115
Conversation
@guggero, remember to re-request review from reviewers when ready |
Closing due to inactivity |
7 similar comments
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
Closing due to inactivity |
!lightninglabs-deploy mute |
a5a24d7
to
7101804
Compare
PR could be simplified after #135, now it's just removing the unused parameter and adding a test case. |
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.
LGTM 🎉
Thank you for refactoring it!
proxy/proxy_test.go
Outdated
|
||
require.Equal( | ||
t, fmt.Sprintf("%d", len(bodyContent)), | ||
resp.Header.Get("Content-Length"), |
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.
Field resp.ContentLength
can be used, to avoid using fmt.Sprintf("%d",
Go documentation says:
// When
// Header values are duplicated by other fields in this struct (e.g.,
// ContentLength, TransferEncoding, Trailer), the field values are
// authoritative.
https://pkg.go.dev/net/http#Response
There are two other instances below in the code.
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.
Makes sense, thanks! Fixed.
7101804
to
9ad67ea
Compare
Fixes #114.