Aaron Lehmann
6cb5670ba5
Use CloseNotifier to supress spurious HTTP 400 errors on early disconnect
...
When a client disconnects without completing a HTTP request, we were
attempting to process the partial request, which usually leads to a 400
error. These errors can pollute the logs and make it more difficult to
track down real bugs.
This change uses CloseNotifier to detect disconnects. In combination
with checking Content-Length, we can detect a disconnect before sending
the full payload, and avoid logging a 400 error.
This logic is only applied to PUT, POST, and PATCH endpoints, as these
are the places where disconnects during a request are most likely to
happen.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 17:30:26 -07:00
Aaron Lehmann
1788ae4870
Update github.com/gorilla/handlers dependency
...
Support for exposing the CloseNotifier interface was just recently added
to its logging handler wrappers. This is needed for #597 .
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 17:30:26 -07:00
Richard Scothern
83c8617cb1
Spelling corrections
...
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-07-31 16:43:11 -07:00
Richard Scothern
bffa20d6bb
Spelling corrections
...
Signed-off-by: Richard Scothern <richard.scothern@gmail.com>
2015-07-31 16:43:11 -07:00
Aaron Lehmann
cfb0b7aa77
Fix uses of "int" where "int64" should be used instead
...
Some structures use int for sizes and UNIX timestamps. On some
platforms, int is 32 bits, so this can lead to the year 2038 issues and
overflows when dealing with large containers or layers.
Consistently use int64 to store sizes and UNIX timestamps in
api/types/types.go. Update related to code accordingly (i.e.
strconv.FormatInt instead of strconv.Itoa).
Use int64 in progressreader package to avoid integer overflow when
dealing with large quantities. Update related code accordingly.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-31 16:31:40 -07:00
Richard Scothern
0b3b55e723
Merge pull request #801 from alexwlchan/master
...
Fix a few typos in the docs
2015-07-31 09:15:35 -07:00
Alex Chan
51bd34eaed
Fix a few typos in the docs
...
Signed-off-by: Alex Chan <alex.chan@metaswitch.com>
2015-07-31 13:36:43 +01:00
tgic
f01a0694c1
remove unused code and fix todo format
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:56 +08:00
tgic
72c794a810
remove unused code and fix todo format
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:56 +08:00
tgic
90595c7ed9
fix goimports
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:56 +08:00
tgic
3eaab7da95
add link to Aliyun OSS doc
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:56 +08:00
tgic
235ccc0590
add include_oss build tag
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:56 +08:00
tgic
e53d99a837
fix goimports
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:56 +08:00
tgic
806b890cd6
add build tag include_oss to circle.yml
2015-07-31 13:22:56 +08:00
tgic
0058b08eeb
add include_oss build tag
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:56 +08:00
Li Yi
9c27080c7a
Update the comment for the consistency model
...
Change-Id: Iee49afeda1c11d6af8c0f26c96d8ccc328c22757
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:55 +08:00
Li Yi
708ad28114
Update the comment for the consistency model
...
Change-Id: Iee49afeda1c11d6af8c0f26c96d8ccc328c22757
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:55 +08:00
Li Yi
5d34d31739
Update the comments for consistence model
...
Change-Id: I161522ee51f247fb17e42844b3699bd9031e34e8
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:55 +08:00
Li Yi
539c7f5311
Update the comments for consistence model
...
Change-Id: I161522ee51f247fb17e42844b3699bd9031e34e8
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:55 +08:00
tgic
faee422420
fix testcase TestReadStreamWithOffset incompatible with oss
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:55 +08:00
tgic
76174ad57e
update doc add endpoint
2015-07-31 13:22:55 +08:00
tgic
a9c3f86ce0
fix oss: got 403 in TestContinueStreamAppendLarge
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:55 +08:00
tgic
8e5c901a26
fix testcase TestReadStreamWithOffset incompatible with oss
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:55 +08:00
Li Yi
440664a109
Update the OSS test case for latest code change
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:55 +08:00
tgic
2a8535626f
fix oss: got 403 in TestContinueStreamAppendLarge
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:55 +08:00
tgic
fc20dd72d6
check access key and secret before run
2015-07-31 13:22:55 +08:00
tgic
9627c6c5a5
godep update oss sdk
...
Signed-off-by: tgic <farmer1992@gmail.com>
2015-07-31 13:22:55 +08:00
Li Yi
813543d6e3
Update the OSS test case for latest code change
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:55 +08:00
tgic
3a240de22e
check access key and secret before run
2015-07-31 13:22:55 +08:00
tgic
d28a3fa28a
add endpoint support
2015-07-31 13:22:54 +08:00
tgic
ee9971a5af
update godep
2015-07-31 13:22:54 +08:00
Li Yi
46148721e1
Add the secure access with HTTPS
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:54 +08:00
tgic
3d30cb38f6
add endpoint support
2015-07-31 13:22:54 +08:00
Li Yi
bffce5722e
Fix the warning of golint
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:54 +08:00
Li Yi
38b23c8dff
Update Godeps for Aliyun OSS
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:54 +08:00
Li Yi
d79179884a
Support OSS driver
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:54 +08:00
Li Yi
c3b42db014
Add the secure access with HTTPS
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:54 +08:00
Li Yi
b8a276f2db
Fix the warning of golint
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:54 +08:00
Li Yi
9e4975d8ff
Support OSS driver
...
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-07-31 13:22:54 +08:00
Tibor Vass
56efe43c95
Merge pull request #14970 from tiborvass/windows-registry-endpoint
...
registry: Change default endpoint on windows to a windows-specific one
2015-07-30 22:41:34 -04:00
Stephen Day
7dc8d4a26b
Merge pull request #789 from aaronlehmann/tls-settings
...
Change server TLS config to tighten security
2015-07-30 18:11:53 -07:00
Stephen Day
ba5ab723ad
Merge pull request #792 from stevvooe/uuid-package-improvements
...
UUID package improvements
2015-07-30 18:10:25 -07:00
Stephen Day
4cc4d440f6
Merge pull request #798 from aaronlehmann/example-config-uploadpurging-2
...
Fix earlier commit to enable upload purging in example config file
2015-07-30 17:42:48 -07:00
Aaron Lehmann
a3acd3a0ba
Fix earlier commit to enable upload purging in example config file
...
Rather than setting this to "true", the whole section should be removed.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 17:32:35 -07:00
Olivier Gambier
8199962098
Merge pull request #796 from aaronlehmann/example-config-uploadpurging
...
Enable upload purging in example configuration file
2015-07-30 17:20:14 -07:00
Aaron Lehmann
4f69ca2c07
Enable upload purging in example configuration file
...
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 17:08:01 -07:00
Stephen Day
7e4b740763
Merge pull request #795 from aaronlehmann/config-file-names
...
Rename dev-config.yml and example-config.yml to config-dev.yml and config-example.yml
2015-07-30 16:41:14 -07:00
Tibor Vass
048339e3f5
registry: allow fallback on unknown errors
...
This patch fixes a bug where a user specifies a v1 mirror for
--registry-mirror and pull an image from the Hub.
It used to not fallback because of an unexpected error returned when
trying to JSON marshal nginx output.
We now ensure that any unexpected error falls back to the next endpoint
in the list.
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-07-30 19:03:38 -04:00
Aaron Lehmann
6c2ef78aa7
Rename dev-config.yml and example-config.yml to config-dev.yml and config-example.yml
...
Better for sort order.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 15:51:50 -07:00
Aaron Lehmann
1368e2ac53
Change run_multiversion.sh to get Docker engine versions from dind container
...
This is much better than downloading the builds with curl, because
Docker is intelligent about only pulling what it needs.
We use tagged versions of dind for the released version, and dind-master
for a master build.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2015-07-30 15:39:19 -07:00