diff --git a/http/upgrade/request/public.go b/http/upgrade/request/public.go index 9144a2d..a6f687e 100644 --- a/http/upgrade/request/public.go +++ b/http/upgrade/request/public.go @@ -10,6 +10,8 @@ import ( // from a reader (typically bufio.NewRead of the socket) func Build(r io.Reader) (request *T, err error) { + /* (1) Parse request + ---------------------------------------------------------*/ /* (1) Get chunk reader */ cr := reader.NewReader(r) if err != nil { @@ -40,14 +42,15 @@ func Build(r io.Reader) (request *T, err error) { } - - /* (2) GET {uri} HTTP/{version} - ---------------------------------------------------------*/ - /* (1) Break apart */ - - - - /* (1) Check method */ - return nil, nil + return req, nil } + + + +// String returns a textual representation of the upgrade request +func (r T) String() string{ + + return fmt.Sprintf("Upgrade Request\n - host: %s\n - port: %d\n", r.host, r.port) + +} \ No newline at end of file