Skip to content

dcb9/go-http

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fork of the standard net/http package.

Some http servers care about the order of the header fields, presumably as an anti-bot protection.

This package extends the standard http package with FixHeaderNamesOrder, which ensures that the specified header names are output in the order you specified.

Usage

Replace all net/http with github.com/hayeah/go-http.

Then:

the first way

http.FixHeaderNamesOrder([]string{"A", "B", "C"})

A, B, C would be output in that order, followed by all other header names in lexical order.

OR

the second way

header := make(http.Header)
header[DamnHeaderFieldsOrder] = []string{"B", "C", "A"}

B, C, A would be output in that order, followed by all other header names in lexical order.

important: the second way's priority is higher

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.8%
  • Other 0.2%