Skip to content
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

If signer had to cap the AMP doc, don't sign and proxy full document. #444

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

MichaelRybak
Copy link
Contributor

No description provided.

resp.Header().Set("Content-Type", "text/html")
resp.Write(customFakeBody)
}
resp := this.get(this.T(), this.new(urlSets), "/priv/doc?sign="+url.QueryEscape(this.httpsURL()+fakePath))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code doesn't look up to date. In particular, I remember replacing this.get() during the FIXIT in PR ec46ffd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

Copy link
Collaborator

@banaag banaag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but wait for twifkak's review.

Copy link
Member

@twifkak twifkak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement, thanks!

Comment on lines 1044 to 1045
veryLongArray := [maxBodyLength + uncappedTailLength]string{}
veryLongString := strings.Join(veryLongArray[:], "a")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can replace this with a call to https://golang.org/pkg/strings/#Repeat.

@MichaelRybak MichaelRybak merged commit c85b103 into ampproject:master Jun 24, 2020
@MichaelRybak MichaelRybak deleted the cont branch June 24, 2020 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants