~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/http_smart_server.txt

  • Committer: John Arbash Meinel
  • Date: 2006-12-15 23:59:15 UTC
  • mto: This revision was merged to the branch mainline in revision 2195.
  • Revision ID: john@arbash-meinel.com-20061215235915-gmqkk3ljhxq3b9bh
Add ability to enable writeable bzr+http access.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
    smart_server_app = wsgi.make_app(
124
124
        root='/srv/example.com/code',
125
125
        prefix='/code/',
126
 
        path_var='REQUEST_URI')
 
126
        path_var='REQUEST_URI',
 
127
        readonly=True)
127
128
 
128
129
    fcgi.WSGIServer(smart_server_app).run()
129
130
        
146
147
    smart_server_app = wsgi.make_app(
147
148
        root='/srv/example.com/code',
148
149
        prefix='/code/',
149
 
        path_var='REQUEST_URI')
 
150
        path_var='REQUEST_URI',
 
151
        readonly=True)
150
152
 
151
153
    def handler(request):
152
154
        """Handle a single request."""
196
198
 
197
199
.. _WSGI standard: http://www.python.org/dev/peps/pep-0333/
198
200
 
 
201
 
 
202
Pushing over ``bzr+http://``
 
203
----------------------------
 
204
 
 
205
It is possible to allow pushing data over the http smart server. The
 
206
easiest way to do this, is to just supply ``readonly=False`` to the
 
207
``wsgi.make_app()`` call. But be careful, because the smart protocol does
 
208
not contain any Authentication. So if you enable write support, you will
 
209
want to restrict access to ``.bzr/smart`` URLs to restrict who can
 
210
actually write data on your system.  At this time, it is not possible to
 
211
allow some people to have read-only access and others to have read-write
 
212
access to the same urls. Because at the HTTP layer (which is doing the
 
213
Authenticating), everything is just a POST request.  However, with a
 
214
simple symlink, you could configure 2 URLs where one has restricted write
 
215
access, and the other has read-only access.
 
216
 
199
217
.. 
200
218
   vim: ft=rst tw=74 et