+
Skip to content

Conversation

k4lizen
Copy link
Contributor

@k4lizen k4lizen commented Oct 3, 2023

Closes #783 .

Copy link
Collaborator

@WGH- WGH- left a comment

Choose a reason for hiding this comment

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

Do you mind writing a unit test for this?

@k4lizen
Copy link
Contributor Author

k4lizen commented Oct 17, 2023

Is that satisfactory? I'm not quite sure what else I could test

@WGH-
Copy link
Collaborator

WGH- commented Oct 17, 2023

Is that satisfactory? I'm not quite sure what else I could test

Well, the test should ensure that no Accept header actually hits the server

@k4lizen
Copy link
Contributor Author

k4lizen commented Oct 17, 2023

Like this?

@WGH-
Copy link
Collaborator

WGH- commented Oct 17, 2023

Right now you only verify what you think you send, not what the server sees. Check the existing TestHeaders test, it's a good example.

@k4lizen
Copy link
Contributor Author

k4lizen commented Oct 18, 2023

Now? :)

Copy link
Collaborator

@WGH- WGH- left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@WGH- WGH- merged commit 3c987f1 into gocolly:master Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot send request with no Accept header

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载