comparison tests/test-push-http.t @ 14093:ce99d887585f

httprepo: long arguments support (issue2126) Send the command arguments in the HTTP headers. The command is still part of the URL. If the server does not have the 'httpheader' capability, the client will send the command arguments in the URL as it did previously. Web servers typically allow more data to be placed within the headers than in the URL, so this approach will: - Avoid HTTP errors due to using a URL that is too large. - Allow Mercurial to implement a more efficient wire protocol. An alternate approach is to send the arguments as part of the request body. This approach has been rejected because it requires the use of POST requests, so it would break any existing configuration that relies on the request type for authentication or caching. Extensibility: - The header size is provided by the server, which makes it possible to introduce an hgrc setting for it. - The client ignores the capability value after the first comma, which allows more information to be included in the future.
author Steven Brown <StevenGBrown@gmail.com>
date Sun, 01 May 2011 01:04:37 +0800
parents b69471bdb678
children 7c26ce9edbd2
comparison
equal deleted inserted replaced
14092:222c8ec7a274 14093:ce99d887585f
64 % serve errors 64 % serve errors
65 $ hg rollback 65 $ hg rollback
66 repository tip rolled back to revision 0 (undo serve) 66 repository tip rolled back to revision 0 (undo serve)
67 working directory now based on revision 0 67 working directory now based on revision 0
68 68
69 expect success, server lacks the httpheader capability
70
71 $ CAP=httpheader
72 $ . "$TESTDIR/notcapable"
73 $ req
74 pushing to http://localhost:$HGPORT/
75 searching for changes
76 remote: adding changesets
77 remote: adding manifests
78 remote: adding file changes
79 remote: added 1 changesets with 1 changes to 1 files
80 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
81 % serve errors
82 $ hg rollback
83 repository tip rolled back to revision 0 (undo serve)
84 working directory now based on revision 0
85
69 expect success, server lacks the unbundlehash capability 86 expect success, server lacks the unbundlehash capability
70 87
71 $ CAP=unbundlehash 88 $ CAP=unbundlehash
72 $ . "$TESTDIR/notcapable" 89 $ . "$TESTDIR/notcapable"
73 $ req 90 $ req