diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-12-01 09:59:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-01 09:59:19 +0100 |
commit | c15bf1dff332873644290db0e186b8f5ad9b8fb2 (patch) | |
tree | 1dd79212333823b70f2792ad116864ea127e4a1c /plumbing/transport/http/fetch_pack.go | |
parent | 7de79aef5d4aa3100382d4df3e99525f9949e8d1 (diff) | |
download | go-git-c15bf1dff332873644290db0e186b8f5ad9b8fb2.tar.gz |
capabilities: full integration (#151)
* format/pktline: fix readPayloadLen err handling
* protocol/pakp: UploadReq validation and creation of capabilities
* protocol/pakp: AdvRef tests
* protocol/pakp: capability.List.Delete
* protocol: filter unsupported capabilities
* remote capability negociation
* transport: UploadRequest validation
* requested changes
Diffstat (limited to 'plumbing/transport/http/fetch_pack.go')
-rw-r--r-- | plumbing/transport/http/fetch_pack.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plumbing/transport/http/fetch_pack.go b/plumbing/transport/http/fetch_pack.go index 40c3a7f..f250667 100644 --- a/plumbing/transport/http/fetch_pack.go +++ b/plumbing/transport/http/fetch_pack.go @@ -70,6 +70,7 @@ func (s *fetchPackSession) AdvertisedReferences() (*packp.AdvRefs, error) { return nil, err } + transport.FilterUnsupportedCapabilities(ar.Capabilities) return ar, nil } @@ -78,6 +79,10 @@ func (s *fetchPackSession) FetchPack(r *packp.UploadPackRequest) (io.ReadCloser, return nil, transport.ErrEmptyUploadPackRequest } + if err := r.Validate(); err != nil { + return nil, err + } + url := fmt.Sprintf( "%s/%s", s.endpoint.String(), transport.UploadPackServiceName, |