File tree Expand file tree Collapse file tree 1 file changed +0
-39
lines changed Expand file tree Collapse file tree 1 file changed +0
-39
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package web
2
2
3
3
import (
4
4
"bytes"
5
- "encoding/binary"
6
5
"encoding/json"
7
6
"errors"
8
7
"fmt"
@@ -126,22 +125,6 @@ type Test struct {
126
125
expectedBody string
127
126
}
128
127
129
- type StructHandler struct {
130
- a string
131
- }
132
-
133
- func (s * StructHandler ) method () string {
134
- return s .a
135
- }
136
-
137
- func (s * StructHandler ) method2 (ctx * Context ) string {
138
- return s .a + ctx .Params ["b" ]
139
- }
140
-
141
- func (s * StructHandler ) method3 (ctx * Context , b string ) string {
142
- return s .a + b
143
- }
144
-
145
128
//initialize the routes
146
129
func init () {
147
130
mainServer .SetLogger (log .New (ioutil .Discard , "" , 0 ))
@@ -464,28 +447,6 @@ func TestReadScgiRequest(t *testing.T) {
464
447
}
465
448
}
466
449
467
- func buildFcgiKeyValue (key string , val string ) []byte {
468
- var buf bytes.Buffer
469
- if len (key ) <= 127 && len (val ) <= 127 {
470
- data := struct {
471
- A uint8
472
- B uint8
473
- }{uint8 (len (key )), uint8 (len (val ))}
474
- binary .Write (& buf , binary .BigEndian , data )
475
- } else if len (key ) <= 127 && len (val ) > 127 {
476
- data := struct {
477
- A uint8
478
- B uint32
479
- }{uint8 (len (key )), uint32 (len (val )) | 1 << 31 }
480
-
481
- binary .Write (& buf , binary .BigEndian , data )
482
- }
483
- buf .WriteString (key )
484
- buf .WriteString (val )
485
-
486
- return buf .Bytes ()
487
- }
488
-
489
450
func makeCookie (vals map [string ]string ) []* http.Cookie {
490
451
var cookies []* http.Cookie
491
452
for k , v := range vals {
You can’t perform that action at this time.
0 commit comments