Going to mess around with pairs
This commit is contained in:
parent
b5745c941b
commit
ce0f9fcfc4
@ -46,6 +46,18 @@ func (client *FCGIClient) writeEndRequest(appStatus int, protocolStatus uint8) e
|
|||||||
return client.writeRecord(FCGI_END_REQUEST, b)
|
return client.writeRecord(FCGI_END_REQUEST, b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Spec: https://www.mit.edu/~yandros/doc/specs/fcgi-spec.html#S3
|
||||||
|
// Name value pairs such as: SCRIPT_PATH = /some/path
|
||||||
|
// Should be encoded as such:
|
||||||
|
// Name size
|
||||||
|
// Value size
|
||||||
|
// Name
|
||||||
|
// Value
|
||||||
|
// The high bit of name size and value size is used for signaling
|
||||||
|
// how many bytes are used to store the length/size.
|
||||||
|
// If the size is > 127, we can just use one byte,
|
||||||
|
// and the high bit will be 0, otherwise, we use
|
||||||
|
// four bytes and the high bit will be 1
|
||||||
func (client *FCGIClient) writePairs(recType FCGIRequestType, pairs map[string]string) error {
|
func (client *FCGIClient) writePairs(recType FCGIRequestType, pairs map[string]string) error {
|
||||||
w := newWriter(client, recType)
|
w := newWriter(client, recType)
|
||||||
b := make([]byte, 8)
|
b := make([]byte, 8)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user