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

net/http: HTTP header ordering #44181

Open
bgbusted opened this issue Feb 9, 2021 · 8 comments
Open

net/http: HTTP header ordering #44181

bgbusted opened this issue Feb 9, 2021 · 8 comments

Comments

@bgbusted
Copy link

@bgbusted bgbusted commented Feb 9, 2021

my issue is one thing the HEADERs goes by the ABC ?
how can I make it like chrome ?
I understand that CanonicalHeaderKey is with makes it by the ABC but how can I keep the order
In python its much easier but the issue is latency... I am trying to make a client for twitch but jesus! twitch doesnt like when you dont short it like chrome
image
I do like when you can use low caps and it does it for you but my real issue is that it doesnt respect the order you put it at
is there any way I can rearrange the "Header map[string][]string"....

I am really confused, I spent over 2 days straight on it,
I even would like to tip 30$ you if you find me a solution :( A nice asian fast food for sure :(
anyways I believe its an issue because some website are too picky in accepting you

@bgbusted
Copy link
Author

@bgbusted bgbusted commented Feb 9, 2021

image

@bgbusted
Copy link
Author

@bgbusted bgbusted commented Feb 9, 2021

Any way I can make it not sorting itself?

@davecheney
Copy link
Contributor

@davecheney davecheney commented Feb 9, 2021

Thank you for raising this issue. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For asking questions, see:

@davecheney davecheney closed this Feb 9, 2021
@bgbusted
Copy link
Author

@bgbusted bgbusted commented Feb 9, 2021

Thank you for raising this issue. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For asking questions, see:

First, I cant express how much I am thankful for your response,
I think this is an issue because some websites would literally reject me just because my headers arent in a very certain way like a browser, this is an issue for the [go/net/http] project. Because I am not the only one who is having this issue, thanks again. Please consider reopening this issue.

@davecheney
Copy link
Contributor

@davecheney davecheney commented Feb 9, 2021

I’m sorry you’re having problems, this issue has been raised in the past and the answer remains that the http package does not support ordering of headers because http does not require it.

Could you talk a little bit about why you need ordered headers, maybe there is another way to solve the problem?

@davecheney davecheney reopened this Feb 9, 2021
@mdlayher mdlayher changed the title [net/http] [how do I make my HEADERS chrome like?] [issue with websites rejecting me] Sending "Header map[string][]string" by order net/http: HTTP header ordering Feb 9, 2021
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Feb 9, 2021

I think this is a duplicate of #24375, related #19292 #21853

@bgbusted
Copy link
Author

@bgbusted bgbusted commented Feb 10, 2021

I think this is a duplicate of #24375, related #19292 #21853

I have issues with literally almost any Cloudflare website... recently I tried to recreate a twitch client but no matter what I do it rejects me. Works fine on Python - requests .... looking online many people are having issues with that same issue as me.
Its a shame because Golang is such a fun language to use

@davecheney
Copy link
Contributor

@davecheney davecheney commented Feb 10, 2021

@bgbusted can you provide a code sample that someone else could run that demonstrates the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants