Commit Graph

27 Commits

Author SHA1 Message Date
Zhang Wei 3551893f46 Fix escaped go vet error
Find one escaped go vet error:

```
$ cd pkg/httputils/
$ go vet .
httputils_test.go:28: arg response for printf verb %q of wrong type:
*net/http.Response
```

You can also find it with

```
$ go vet github.com/docker/docker/pkg/httputils/
```

or

```
$ go vet ./...
```

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-01-18 00:13:09 +08:00
Boaz Shuster b1996728aa Update docs and code to use application/x-tar in the build API
At the "Build image from Dockerfile" section in the API docs
the Content-Type header is missing.
In addition, some parts in the code are still setting the
Content-Type header to application/tar while it was changed
to application/x-tar since 16th September 2015.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-01-10 06:40:06 +02:00
lixiaobing10051267 6305817184 optimize Fatalf with the expectedError
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2017-01-05 14:47:36 +08:00
Vincent Demeester 522bfd926b
Enhance pkg/{httputils,integration}, distribution/xfer unit tests
- Make it possible to define a shorter waiting time of httputils
- Make a small hack to reduce the waiting time on distribution/xfer

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-28 11:54:05 +01:00
Jie Luo ea2dd4b5d0 duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
2016-12-21 20:16:19 +08:00
yuexiao-wang 11454e1c97 Fix a bit typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-09 03:05:11 +08:00
wefine f78f7de96a fix t.Errorf to t.Error in serveral _test.go
Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
2016-11-14 17:54:43 +08:00
allencloud c1be45fa38 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-06-02 17:17:22 +08:00
Stefan Weil 2eee613326 Fix some typos in comments and strings
Most of them were found and fixed by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-22 20:27:15 +01:00
Vincent Demeester 5c80c3fb3c Update httputils tests
- Make sure we use httptest instead of depending on network
- Update resumablerequestreader tests

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-09 14:59:25 +02:00
Doug Davis 5e540bdc13 More httputil tests for the docker header
follow-on to #15911

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-08-28 12:16:37 -07:00
David Calavera 243f98ff6d Fix server header parsing.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-08-28 11:06:24 -04:00
Kristina Zabunova f753f6d597 unit test refactor in pkg/httputils as suggested by vdemeester; using pattern if x := …; x == nil {}
Signed-off-by: Kristina Zabunova <triara.xiii@gmail.com>
(cherry picked from commit c3f1b2a5bd)
2015-08-28 10:41:19 -04:00
Kristina Zabunova b3f999e863 Increased test coverage of httputils to 70 %
Signed-off-by: Kristina Zabunova <triara.xiii@gmail.com>
(cherry picked from commit d71817464e)
2015-08-28 10:41:19 -04:00
Lei Jitang 27a8f9937e Enable golint part of #14756
pkg/broadcastwriter
pkg/graphdb
pkg/httputils
pkg/ioutils

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-08-03 09:45:05 +08:00
Moysés Borges 8b0e40bb38 Fixed outdated comment.
Synchronized the comment for httputils/mimetype.DetectContentType
with the actual code.

Signed-off-by: Moysés Borges <moysesb@gmail.com>
2015-07-02 08:17:11 -03:00
John Howard 126529c6d0 Windows: Security warning based on server OS
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-26 10:33:45 -07:00
Moysés Borges d48bface59 Support downloading remote tarball contexts in builder jobs.
Signed-off-by: Moysés Borges <moysesb@gmail.com>
2015-06-19 16:35:00 -03:00
unclejack 2f6e4fdb29 linting changes
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2015-06-17 01:16:57 +03:00
Antonio Murdaca c30a55f14d Refactor utils/utils, fixes #11923
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-14 01:37:36 +02:00
Antonio Murdaca 6f4d847046 Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
Frank Herrmann 2770a88413 add tests for pkg/httputils
closes #11597

Signed-off-by: Frank Herrmann <fgh@4gh.tv>
2015-03-24 16:27:09 +00:00
Arnaud Porterie 89bdaa35e0 Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
2015-03-06 18:21:51 -08:00
Alexandr Morozov 7c62cee51e Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
Alexandr Morozov 16e850fe3e
Use increment operator
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-30 21:43:48 +04:00
Josiah Kiehl a02f67be5b Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
2014-08-13 15:18:15 -07:00
unclejack c0517857f6 move resumablerequestreader to pkg
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
2014-07-29 16:30:45 +03:00