Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MalformedHostHeaderOverride ¶
MalformedHostHeaderOverride is a wrapper to be able to overcome the 400 Bad request coming from old docker clients that send an invalid Host header.
type MalformedHostHeaderOverrideConn ¶
MalformedHostHeaderOverrideConn wraps the underlying unix connection and keeps track of the first read from http.Server which just reads the headers.
func (*MalformedHostHeaderOverrideConn) Read ¶
func (l *MalformedHostHeaderOverrideConn) Read(b []byte) (n int, err error)
Read reads the first *read* request from http.Server to inspect the Host header. If the Host starts with / then we're talking to an old docker client which send an invalid Host header. To not error out in http.Server we rewrite the first bytes of the request to sanitize the Host header itself. In case we're not dealing with old docker clients the data is just passed to the server w/o modification.